All pastes #226209 Raw Edit

Someone

public text v1 · immutable
#226209 ·published 2006-10-28 10:59 UTC
rendered paste body
on *:TEXT:!change *:#:{
  if ($nick isop $chan) || ($nick ishop $chan) || ($nick isvo $chan) {
    /set %pcsettime $ctime
    /set %nick $nick
    /set %pcw $2-
    /set %pcsettime $ctime
    /set %nick $nick
    /msg $chan 12The Pest control world has been updated. Type 4!pcw 12to see it. 
    else {
      /notice $nick You NEED Voice or higher to use the !change command.
    }
  }
  on *:text:!pc:#: { 
    /inc %countpcw 1
  /notice $nick 12Current PC World is4  %pcw 12Last Updated:4 $+($duration($calc($ctime - %pcsettime)),) - 12Last Set by:4 %nick 12This command has been used4 %countpcw times $+ .   }
}
on *:text:!pcw:#: { 
  /inc %countpcw 1
/notice $nick 12Current PC World is4  %pcw 12Last Updated:4 $+($duration($calc($ctime - %pcsettime)),) - 12Last Set by:4 %nick 12This command has been used4 %countpcw times $+ .   }
}
on *:text:!world:#: { 
/inc %countpcw 1
/notice $nick 12Current PC World is4  %pcw 12Last Updated:4 $+($duration($calc($ctime - %pcsettime)),) - 12Last Set by:4 %nick 12This command has been used4 %countpcw times $+ .   }
}
on *:text:!startpcw:#: { 
/set %pcstarttime $ctime
}
on *:text:!endpcw:#: { notice $nick That game lasted: $+($duration($calc($ctime - %pcstarttime)),) }

alias col1 { return $+( $1-,12) } 
alias col2 { return $+( $1-,12) } 

on $*:TEXT:/^[!@.]clan */Si:#:{ 
  if (!$2) { 
    notice $nick *** [ $+ $col1(Clan)]: $col2(You must supply a name) 
    halt 
  } 
  elseif $2 == zezima || $2 == n0valyfe { 
    notice $nick *** [$+ $col1(Clan)]: $col2(You are not aloud to do that) 
  } 
  else { 
    set %clan.name $replace($2- ,$chr(32),+) 
    set %clan.style $iif($left($1,1) == @,msg $chan,.notice $nick) 
    sockopen clan.socket runehead.com 80 
  } 
} 
on *:SOCKOPEN:clan.socket:{ 
  sockwrite -n $sockname GET /clans/search.php?search= $+ %clan.name $+ &searchtype=exact 
  sockwrite -n $sockname Host: $+(www.runehead.com,$crlf,$crlf)    
} 
on *:SOCKREAD:clan.socket:{ 
  if ($sockerr) { 
    %clan.style *** [ $+ $col1(Clan)]: $col2(Error while connecting) 
    sockclose $sockname 
    halt 
  } 
  else { 
    var %tmp 
    sockread %tmp 

    if $regex(results,%tmp,/<p>No results were found for the <b>exact</b> search <b>(.*)</b/) { 
      %clan.style *** [ $+ $col1(Clan)]: $col2(%clan.name) $col1(is not in any clans on) $col2(RuneHead) 
      halt 
      sockclose $sockname 
    } 
    elseif $regex(results,%tmp,/<p>The <b>exact<\/b> search <b>(.*)<\/b> returned <b>(\d+)/) { 
      %clan.style *** [ $+ $col1(Clan)]: $col2($regml(results,2)) $col1(result(s) were found for) $col2(%clan.name) 
    } 
    if $regex(clan,%tmp,/<td style='width:90px; border-color:#404040;'><a href='(.*)'>(.*)</a></td>/) {  
      %clan.style *** [ $+ $col1(Clan)]: $col2(%clan.name) $col1(is in clan:) $col2($regml(clan,2)) $col1(() $+ $col2($+(http://runehead.com/clans/,$regml(clan,1))) $+ $col1()) 
    } 
    if </html> iswm %tmp { 
      sockclose $sockname 
    } 
  } 
} 
on *:SOCKCLOSE:clan.*:{ 
  unset %clan.* 
  halt 
}