on $*:TEXT:$(/^(\Q $+ $me $+ \E,? )?[!@.]stats/Si):#:{ if ($readini(Status.ini,$network,$chan) == DChan && $remove($1,$chr(44)) != $me) { halt } else { if ($nick !isop $.chan && $nick !ishop $.chan && $remove($1,$chr(44)) == $me) { notice $nick $logo This is a staff command! halt } else { if ($chr(42) !isin $2-) { var %i = $rand(10000,99999) set %stats.display. $+ %i $& $iif($left($iif($remove($1,$chr(44)) == $me,$iif($nick ison $.chan,$2),$1),1) == @,$iif($remove($1,$chr(44)) != $me && $readini(Status2.ini,$network,$chan),.notice $nick,msg $chan),.notice $nick) if (($iif($remove($1,$chr(44)) == $me,$3,$2) == -e) && ($left($iif($remove($1,$chr(44)) == $me,$3,$2),1) == <) || ($iif($remove($1,$chr(44)) == $me,$3,$2) == >)) { set %stats.exp. $+ %i yes if ($left($iif($remove($1,$chr(44)) == $me,$4,$3),1) == <) { set %stats.sign. $+ %i $iif($remove($1,$chr(44)) == $me,$4,$3) } if ($left($iif($remove($1,$chr(44)) == $me,$4,$3),1) == >) { set %stats.sign. $+ %i $iif($remove($1,$chr(44)) == $me,$4,$3) } set %stats.nick. $+ %i $iif($remove($1,$chr(44)) == $me,$5,$4) sockopen stats. $+ %i www.o-ss.net 80 } elseif (($left($iif($remove($1,$chr(44)) == $me,$3,$2),1) == <) || ($iif($remove($1,$chr(44)) == $me,$3,$2) == >)) { if ($left($iif($remove($1,$chr(44)) == $me,$3,$2),1) == <) { set %stats.sign. $+ %i $iif($remove($1,$chr(44)) == $me,$3,$2) } elseif ($iif($remove($1,$chr(44)) == $me,$3,$2) == >) { set %stats.sign. $+ %i $iif($remove($1,$chr(44)) == $me,$3,$2) } set %stats.nick. $+ %i $iif($remove($1,$chr(44)) == $me,$4,$3) sockopen stats. $+ %i www.o-ss.net 80 } elseif ($iif($remove($1,$chr(44)) == $me,$3,$2) == -e) { set %stats.exp. $+ %i yes set %stats.nick. $+ %i $iif($remove($1,$chr(44)) == $me,$4,$3) sockopen stats. $+ %i www.o-ss.net 80 } else { set %stats.nick. $+ %i $iif($remove($1,$chr(44)) == $me,$3,$2) sockopen stats. $+ %i www.o-ss.net 80 } } } } } on *:SOCKOPEN:Stats*: { Sockwrite -nt $sockname GET /parsers/stats.php?user= $+ $($+(%,stats,.,nick,.,$gettok($sockname,2,46)),2) HTTP/1.1 Sockwrite -nt $sockname Host: www.o-ss.net Sockwrite -nt $sockname $crlf } on *:SOCKREAD:Stats*: { var %sockread sockread %sockread if (*mining* Iswm %sockread) { set %stats.yes. $+ $gettok($sockname,2,46) kindof } if (*overall* iswm %sockread) { set %stats.yes. $+ $gettok($sockname,2,46) yes } if (($($+(%,stats,.,yes,.,$gettok($sockname,2,46)),2) == yes) && (*end* !iswm %sockread)) { Set %stats.msg. $+ $gettok($sockname,2,46) $($+(%,stats,.,msg,.,$gettok($sockname,2,46)),2) $c1($gettok(%sockread,1,32) $+ :) $c2($gettok(%sockread,$iif($($+(%,stats,.,exp,.,$gettok($sockname,2,46)),2) == yes,4,3),32)) } if (($($+(%,stats,.,yes,.,$gettok($sockname,2,46)),2) == kindof) && (*end* !iswm %sockread)) { Set %stats.msg2. $+ $gettok($sockname,2,46) $($+(%,stats,.,msg2,.,$gettok($sockname,2,46)),2) $c1($gettok(%sockread,1,32) $+ :) $c2($gettok(%sockread,$iif($($+(%,stats,.,exp,.,$gettok($sockname,2,46)),2) == yes,4,3),32)) } if (*END* Iswm %sockread) { $($+(%,stats,.,display,.,$gettok($sockname,2,46)),2) $logo $c1(Stats For:) $c2($($+(%,stats,.,nick,.,$gettok($sockname,2,46)),2)) $($+(%,stats,.,display,.,$gettok($sockname,2,46)),2) $($+(%,stats,.,msg,.,$gettok($sockname,2,46)),2) $($+(%,stats,.,display,.,$gettok($sockname,2,46)),2) $($+(%,stats,.,msg2,.,$gettok($sockname,2,46)),2) } }