All pastes #568303 Raw Edit

RSSTATS script...

public text v1 · immutable
·published 2007-06-15 13:37 UTC
rendered paste body
on $*:text:/^[!@](rsstats|stats)/Si:#: { 
  set %rsstats $iif($left($1,1) == @, msg $chan, notice $nick) 
  if ($sock(stats)) %rsstats Please wait, bot is busy. 
  if ( $2- == $null ) { 
    %rsstats You must suply a user: !stats RUNSCAPENAME 
  } 
  else { 
    set %nick $2- 
    sockopen stats www.parsers.o-ss.net 80 
  } 
} 
on *:SOCKOPEN:stats: { 
  sockwrite -nt $sockname GET /stats.php?user= $+ $replace(%nick,$char(32),+) HTTP/1.1 
  sockwrite -nt $sockname HOST: www.parsers.o-ss.net
  sockwrite -nt $sockname $crlf 
} 
on *:SOCKREAD:stats: { 
  var %statsn 
  sockread %statsn 
  if (*does* iswm %statsn) {
    %rsstats Sorry, but %nick does not feature in the highscores.
    unset %rsstats %nick
    sockclose $sockname
    unset %style %nick
  }
  elseif (%cotinue == true) {
    tokenize 32 %statsn
    set %stats %stats $1 $3
    if ($1 == Consruction) {
      %rsstats %stats
      unset %rsstats %nick %continue %stats
    }
  }
  elseif (*overall* iswm %statsn) {
    tokenize 32 %statsn
    set %stats $1 $3
    set %continue true
  }
}