alias hp {
var %ticks = $ticks
sockopen $+(hp,%ticks) www.hellsparadise.co.uk 80
sockmark $+(hp,%ticks) $1-
}
alias textBold return $+($chr(2),$1-,$chr(2))
alias tread return $read(hptemp.txt,s,$1)
alias twrite write hptemp.txt $1-
on *:SOCKOPEN:hp*:{
sockwrite -nt $sockname GET /viewuser.php?u= $+ $iif($1 isnum,$1,$read(hpids.txt,s,$1)) HTTP/1.0
sockwrite -nt $sockname Host: www.hellsparadise.co.uk $+ $crlf $+ $crlf
}
on *:SOCKREAD:hp*:{
var %a | sockread %a
if ($regex(%a,/<td valign="top">"Name: "<a href="viewuser.php?u= $iif($1 isnum,$1,$read(hpids.txt,s,$1)) $+ " style="color:#:"><\/a><\/td> twrite name $regml(2)
}
on *:SOCKCLOSE:hp*:{
write -c hptemp.txt
}
on *:TEXT:!hpinfo*:#:{
if ($read(hpids.txt,s,$iif($2,$2,$nick))) || ($2 isnum) { hp $iif($2,$2,$nick) # }
else { msg $chan There is no ID saved for $textbold($iif($2,$2,$nick)) $+ ! }
}