on *:TEXT:!players:#:{
set %rsplayers.display msg $chan
if ($sock(rsplayers)) {
sockclose rsplayers
}
sockopen rsplayers runescape.com 80
}
on *:SOCKOPEN:rsplayers:{
sockwrite -nt $sockname GET /lang/en/aff/runescape/title.ws HTTP/1.1
sockwrite -nt $sockname Host: runescape.com
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:rsplayers:{
if ($sockerr) {
%rsplayers.display Socket error
unset %rsplayers.*
}
else {
var %read
while (1) {
sockread -f %read
if (!$sockbr) { break }
if (*there are currently* iswm %read) {
set %players $4
%rsplayers.display 4 $striptags(%read) Which is an average of $calc( %players / 132)
}
}
}
}