alias -1 htmlfree {
var %x = "", %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
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
}