All pastes #136068 Raw Edit

Anonymous

public text v1 · immutable
#136068 ·published 2006-08-17 11:56 UTC
rendered paste body
on *:TEXT:!grs forum:#:{
  set %grsforums.display msg $chan
  if ($sock(grsforums)) {
    sockclose grsforums
  }
  sockopen grsforums forum.global-rs.net 80
}
on *:SOCKOPEN:grsforums:{
  sockwrite -nt $sockname GET /index.php HTTP/1.1
  sockwrite -nt $sockname Host: forum.global-rs.net
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:grsforums:{
  if ($sockerr) {
    %grsforums.display Socket error
    unset %grsforums.*
  }
  else {
    var %read
    while (1) {
      sockread -f %read
      if (!$sockbr) { break }
      if (The newest registered user is* iswm %read) {
        %grsforums.display $striptags(%read)
      }
    }
  }
}
alias striptags { var %x,%y = $regsub($1-,/(<[^>]+>)/g,$null,%x) | return $remove(%x,&nbsp;)