All pastes #1044277 Raw Edit

Mine

public text v1 · immutable
#1044277 ·published 2008-06-10 22:12 UTC
rendered paste body
    if ($nick isop $chan) || ($nick ishop $chan) {
      if ($2 isnum) {
        writeini botinfo.ini pcw $chan $+ .world $2
        writeini botinfo.ini pcw $chan $+ .setby $nick
        writeini botinfo.ini pcw $chan $+ .wst $ctime
        msg $chan ** $+([,$c1($nick,PCW),]:) $c2($nick,The PCW has been updated! Type) $c1($nick,!pcw) $c2($nick,to see it.)
      }
      elseif ($2 == $null) {
        remini botinfo.ini pcw $chan $+ .world
        remini botinfo.ini pcw $chan $+ .setby
        remini botinfo.ini pcw $chan $+ .wst
        notice $nick *** $+([,$c1($nick,PCW),]:) $c2($nick,The PCW has been unset.)
      }
    }
  }
}
on $*:TEXT:/^[!@]ge\b/Si:#: {
  var %x 1
  while ($sock(ge. $+ %x)) inc %x
  sockopen $+(ge.,%x) itemdb-rs.runescape.com 80
  sockmark $+(ge.,%x) $iif($left($1,1) $+(=,=) @ && $istok($readini(botinfo.ini,n,IgnoreChannel,Channels),$chan,32) $+(=,=) $false,msg $chan,notice $nick) $+ ~ $+ $2- $+ ~ $+ $nick
}
on *:SOCKOPEN:ge.*: {
  tokenize 126 $sock($sockname).mark
  sockwrite -nt $sockname GET /results.ws?query=%22 $+ $2 $+ $+(%,22) $+ &price=all&members= HTTP/1.1
  sockwrite -nt $sockname Host: itemdb-rs.runescape.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:ge.*: {
  tokenize 126 $sock($sockname).mark
  var %read
  sockread %read
  if (*items*matched*the*search*term* iswm %read) {
    if (*0 items matched the search term* iswm %read) {
      $1 *** $+([,$c1($3,GE),]:) $c2($3,There were no results found for) $qt($c1($3,$2)) $+ .
      sockclose $sockname
    }