All pastes #423068 Raw Edit

Someone

public text v1 · immutable
·published 2007-04-03 21:49 UTC
rendered paste body
alias -1 htmlfree {
  var %x = "", %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}
alias news sockclose news | sockopen news news.runescape.com 80
on *:sockopen:news: {
  sockwrite -n $sockname Get /newsitem.ws?id=549 HTTP/1.1
  sockwrite -n $sockname Host: news.runescape.com $+ $crlf $+ $crlf
}
on *:sockread:news: {
  if ($sockerr) { 
    echo -a Error  
    halt 
  }
  else {
    sockread %temp
    if (*news* iswm %temp) {
      notice %nick $htmlfree(%temp)                (<---- line that is messed up)
      .timerSOCKET 1 1 sockclose news
    }
  }
}
on *:sockclose:news: {
}
on *:text:!news:#: {
  set %nick $nick
  news
}