All pastes #345594 Raw Edit

Someone

public text v1 · immutable
·published 2007-02-08 17:30 UTC
rendered paste body
alias stats {   
  set %statsn.uname.alias $iif($1,$replace($1-,$chr(32),$chr(43)),$nick)   
  sockopen statsalias slushpuppy.silverinterlocution.org 80
}
on *:sockopen:statsalias:{  
  if ($sockerr) { halt }  
  sockwrite -nt $sockname GET /rsstats.php?stats= $+ %statsn.uname.alias HTTP/1.1  
  sockwrite -nt $sockname Host: slushpuppy.silverinterlocution.org $crlf $+ $crlf
}
on *:sockread:statsalias:{  
  if ($sockerr) { halt }  
  else {    
    sockread %stats.output   
    if (*overall* iswm %stats.output) || (*strength* iswm %stats.output) || (*defense* iswm %stats.output) || (*fletching* iswm %stats.output) || (*cooking* iswm %stats.output) || (*firemaking* iswm %stats.output) || (*fishing* iswm %stats.output) {      
  return %stats.output    
}  
  }
}
on *:dialog:toolkit:sclick:8:{
  set %display.stats $stats($did(toolkit,7))
  did -a toolkit 9 $remove(%display.stats,<br>)
}