All pastes #370190 Raw Edit

Someone

public text v1 · immutable
#370190 ·published 2007-02-24 10:00 UTC
rendered paste body
on *:INPUT:#Ahoy:{
  if ($1 == !rsf) {
    sockopen forums www.runescape.com 80
  }
}
on *:sockopen:forums:{
  sockwrite -n $sockname GET /lang/en/aff/runescape/forums.ws?33,34 HTTP//1.1
  sockwrite -n $sockname host: www.runescape.net
  sockwrite -n $sockname $crlf
}

on *:SOCKREAD:forums:{
  if ($sockerr) {
    Echo -a *** An error has occured: $sock($sockname) 
    beep 2
    halt
  }
  var %Forums
  sockread %Forums
  if (*Raw Sharks* iswm %Forums) {
    msg #Ahoy $htmlfree(%Forums)
    sockclose $sockname
  }
}


alias -l htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}