rendered paste bodyalias stats {
if (#* iswm $1) && ($me ison $1) { set %a msg $1 }
elseif ($1 == notice) && ($2) { set %a .notice $2 }
else { set %a echo -a }
set %b $iif($gettok($1-,-1,32) isnum, $gettok($1-,-1,32),2)
sockopen rsstats slushpuppy.silverinterlocution.org 80
}
on *:SOCKOPEN:rsstats:{
sockwrite -nt $sockname GET /rsstats.php?stats=tobylane HTTP/1.1
sockwrite -nt $sockname Host: slushpuppy.silverinterlocution.org
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:rsstats:{
if ($sockerr) {
%a Socket error: $sockerr $+ , while looking up tobylane
}
else {
sockread %x
if (Overall isin %x) {
if (%b == 1) {
%a $replace($remove(%x,<br>), |, $num)
sockclose rsstats | halt
}
}
elseif (level isin %x) {
if (%b != 1) {
%a $remove(%x,<br>)
sockclose rsstats
}
}
unset %x
}
}
Then in channel of popups (ignore the news bit),
Runescape
.News
..Public
..Private: $$?="bla"
.Combat
..Channel:/stats $chan 2
..Private:/stats notice $$?="Who?" 2
..Self: stats
.Stats
..Channel:/stats $active 1
..Private:/stats notice $$?="Who?" 1
..Self: stats 1