alias -l htmlfree {
; It's local because it won't be used by the command line, only this file.
; Local aliases avoid conflicting names.
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}
alias stats sockopen hiscore hiscore.runescape.com 80 | var %user $1
on *:sockopen:hiscore: {
sockwrite -n $sockname GET /lang/en/aff/runescape/hiscorepersonal.ws?user1= $+ %user HTTP/1.1
; This is telling the socket to connect to the specific page, using "GET".
sockwrite -n $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf
; This states the host once again.
}
on *:sockread:hiscore:{
if ($sockerr) {
echo -a Error.
halt
}
else {
var %temptext
sockread %temptext
if (<td align="right">*</td><br> iswm %temptext) {
echo -a -
echo -a $htmlfree(%temptext)
msg $active $htmlfree(%temptext)
}
}
}