rendered paste bodyon $*:TEXT:$(/^(?>\Q $+ $me $+ \E,? ?)?([!@.](playing|cpp|peopleplaying|rsp|players)/Si):#:{
if ($readini(Status.ini,$network,$chan) == DChan && $remove($1,$chr(44)) != $me) { halt }
elseif ($iif($remove($1,$chr(44)) == $me,$3,$2)) {
if ($nick !isop $.chan && $nick !ishop $.chan && $remove($1,$chr(44)) == $me) {
notice $nick $logo This is a staff command!
halt
}
var %ble = $rand(10000,99999)
set %display.player. [ $+ [ %ble ] ] $iif($remove($1,$chr(44)) == $me,$iif($left($2,1) == @,msg $chan,notice $nick),$iif($left($1,1) == @,msg $chan, notice $nick))
sockopen rspeople. [ $+ [ %ble ] ] www.runescape.com 80
}
}
on *:SOCKOPEN:rspeople.*: {
sockwrite -nt $sockname GET /lang/en/aff/runescape/title.ws HTTP/1.1
sockwrite -nt $sockname Host: www.runescape.com
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:rspeople.*: {
if ($sockerr) %display.player. [ $+ [ %ble ] ] I'm sorry, there's been an error somewhere online, please try again in a few moments.
else {
var %omg.player
sockread %omg.player
if (There are currently * people playing! iswm %omg.player) {
tokenize 32 %omg
%display $c1(There are currently) $c2($4) $c1(people playing runescape!)
unset %omg.player
sockclose rspeople
}
}
}