rendered paste bodyalias GetUser {
if ($sock(world)) {
sockclose world
}
set %dw [ %pcworld ]
sockopen world littleguard.freehostia.com 80
timerGetUser 0 30 GetUser
}
on *:CONNECT: {
GetUser [ %pcworld ]
}
on *:SOCKOPEN:world: {
sockwrite -nt $sockname GET /world.php?world= [ $+ [ %dw ] ] HTTP/1.1
sockwrite -nt $sockname Host: littleguard.freehostia.com $+ $crlf $+ $crlf
}
on *:SOCKREAD:world: {
if ($sockerr) {
sockclose $sockname
halt
}
else {
var %read
sockread %read
if (*br* iswm %read) {
tokenize 32 $htmlfree(%read)
echo -t Users in [04 $+ $iif($2 == members,P2P,F2P) $+ ] %dw $+ :04 $1
set %pcworld.users $1
set %pcworld.type $2
unset %dw
}
}
}