on $*:TEXT:/^[!@](rsnews)/Si:#:{ %ways = $iif($left($1,1) = @,msg $chan,notice $nick) sockopen rsnews runescape.com 80 } on *:sockopen:rsnews:{ sockwrite -n $sockname GET /lang/en/aff/runescape/title.ws HTTP/1.1 sockwrite -n $sockname Host: runescape.com $+ $crlf $+ $crlf } on *:sockread:rsnews:{ if ($sockerr) { echo -a Error. halt } else { var %rsnews sockread %rsnews if (
* iswm %rsnews || *
* iswm %rsnews) { var %stripped = $nohtml(%rsnews), %rsnewsdate = $gettok(%stripped,1,32), %rsnewstitle = $gettok(%stripped,2-,32), %rsnewstext = $gettok(%stripped,4-,32) %ways 1¤¤¤ 12RuneScape News 1¤¤¤7 %rsnewstitle 1¤7 %rsnewsdate 14¤ } if (* iswm %rsnews) { %ways 3 $nohtml(%rsnews) sockclose $sockname } } } alias -l nohtml { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$chr(32),%x), %x = $remove(%x, ) return %x }