on *:text:*:#: { tokenize 32 $strip($1-) if ($left($1,1) !isin @!.) halt if ($right($1,-1) == compare) var %style = astats else halt inc %ID if ($len($3) > 12) { $($+(%,stats.display.,%ID),2) $c1(The username) $c2($2) $c1(is too long) comparecleanup %ID halt } if ($len($4) > 12) { $($+(%,stats.display.,%ID),2) $c1(The username) $c2($3) $c1(is too long) comparecleanup %ID halt } elseif ($len($3) < 12) && ($len($4) < 12) { set $+(%,compare.rsn1.,%ID) $2 set $+(%,compare.rsn2.,%ID) $3 } set $+(%,compare.style.,%ID) %style set $+(%,compare.skill.,%ID) %skill set $+(%,compare.display.,%ID) $iif($left($1,1) == @,msg $chan,notice $nick) set $+(%,compare.nick.,%ID) $nick sockopen $+(compare.,%ID) hiscore.runescape.com 80 } on *:sockopen:compare.*: { var %id = $gettok($sockname,2,46) sockwrite -n $sockname GET /lang/en/aff/runescape/compare.ws?user1= $+ $($+(%,compare.rsn1.,%ID),2) $+ &user2= $+ $($+(%,compare.rsn2.,%ID),2) HTTP/1.1 sockwrite -n $sockname Host: hiscore.runescape.com $+ $crlf $+ $crlf } ;HELL IF I KNOW WHAT THIS MEANS - FROM HERE TO...; on *:sockread:compare.*: { sockread &Incoming bwrite $sockname -1 -1 &Incoming if ($bfind(&Incoming, 1, ).text) makehash $sockname elseif ($bfind(&Incoming, 1, does not feature in the hiscores.).text) { $($+(%,stats.display.,%ID),2) $c1(The username) $c2($($+(%,compare.rsn1.,%ID),2)) $c1(or) $c2($($+(%,compare.rsn2.,%ID),2)) $c1(does not appear in the hiscores) comparecleanup $gettok($sockname,2,46) } } alias -l makehash { var %file = $1 bread %file 1 $file(%file).size &stats var %currentstat, %x = 1 while (%x) { var %x = $bfind(&stats,$calc(%x + 1),