All pastes #337328 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-02-02 18:32 UTC
rendered paste body
on $*:text:/^[!@.](cml|lvl) /Si:#: {
  sockclose pckick
  set %pckick $iif($left($1,1) == @, msg $chan, notice $nick)
  set %nick $nick
  set %user $2-
  sockopen pckick rsparsers.awardspace.com 80
}
ON *:SOCKOPEN:pckick: {
  sockwrite -nt $sockname GET /stats.php?mode=cmb&user= $+ %user HTTP/1.1
  sockwrite -nt $sockname Host: rsparsers.awardspace.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:pckick: {
  var %sockreader | sockread %sockreader
  if (*Attack:* iswm %sockreader ) { set %attack $remove(%sockreader,Attack:) }
  if (*Strength:* iswm %sockreader ) { set %strength $remove(%sockreader,Strength:)
    %pckick $chr(124) Attack: %attack $chr(124) Strength: %strength $chr(124)
    sockclose $sockname
  }
}

ON *:SOCKCLOSE:pckick: {
  unset %attack | unset %strength | unset %nick
}
alias htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}