on $*:text:/^[!@.]stats (-s)?.{1,12}$/Si:#:{ if ($sock(stats).status != $null) { notice $nick Stats Script is in use. Try again.... now! | halt } if ($left($1,1) == @) && ($left($remove($chan(#).mode,+),1) === c) || ($right($left($remove($chan(#).mode,+),2),1) === c) { set %stats.cstrip on } if ($2 == $null) && ($readini($scriptdirnamedb.ini,RS-Names,$address($nick,3)) == $null) { notice $nick Please Store your RSN via $1 -s your-rsn | halt } set %stats.nick $nick | set %stats.send $iif($left($1,1) == @,.msg $chan,.notice $nick) if ($2 == -s) { writeini namedb.ini RS-Names $address($nick,3) $replace($3-,$chr(32),+) | %stats.msg Name Stored Successfully. | unset %stats.* | halt } if ($2- != -s) { set %stats.rsn $replace($2-,$chr(32),+) } if ($2- == $null) && ($readini($scriptdirnamedb.ini,RS-Names,$address($nick,3)) != $null) { set %stats.rsn $replace($readini($scriptdirnamedb.ini,RS-Names,$address($nick,3)),$chr(32),+) } sockopen stats vulcan.ueuo.com 80 ;msg color 1; set %stats.color1 $+($chr(3),14) ;msg color 2; set %stats.color2 $+($chr(3),10) } on *:sockopen:stats:{ if ($sockerr) { .notice %stats.nick Stats Script SockOpen Error: $sock(stats).wsmsg | echo -s Stats Script SockOpen Error: $sock(stats).wsmsg | unset %stats.* | return } sockwrite -nt $sockname GET /geniestats.php?rsname= $+ %stats.rsn HTTP/1.0 sockwrite -nt $sockname Host: vulcan.ueuo.com $+ $str($crlf,2) } on *:sockread:stats:{ if ($sockerr > 0) { .notice %stats.nick Stats Script SockRead Error: $sock(stats).wsmsg | echo -s Stats Script SockRead Error: $sock(stats).wsmsg | unset %stats.* | return } var %stats.read | sockread %stats.read if (Personal isin %stats.read) { set %stats.name $remove(%stats.read,Personal $+ $chr(32),Scores $+ $chr(32),For $+ $chr(32),,) | set %stats.text $remove(%stats.read,,) | set %stats.text $left(%stats.text,- $+ $len(%stats.name)) } tokenize 124 $remove(%stats.read,Genie:) if ($0 == 4) { set %stats.printline1 %stats.printline1 $eval($+(%stats.color1,$1,:,%stats.color2),2) $3 } } on *:sockclose:stats:{ stat_check } alias -l stat_check { if (%stats.printline1 != $null) { %stats.send $iif(%stats.cstrip != $null,%stats.text %stats.name,$+(%stats.color1,%stats.text,%stats.color2) %stats.name) | %stats.send %stats.printline1 | unset %stats.* | halt } else { %stats.send $iif(%stats.cstrip != $null,This person doesnt appear in any skill listed on the hiscores,%stats.color1 $+ This person doesnt appear in any skill listed on the hiscores.) | unset %stats.* | halt } }