package require http bind pub - @stats firstsocket proc firstsocket {nick userhost handle chan text} { regsub -all { } $text "-" text if {$text != ""} { set rsn "$text" } else { set rsn "$nick" } set site "http://ZetaScript.org/Zeta/stats.php?" set url $site[http::formatQuery player $rsn] set read [::http::data [::http::geturl $url -timeout 10000]] foreach line [split $read \n] { if {[string match *Warning* $line] == 1} { putserv "PRIVMSG $chan :\00310Un$ if {[lindex [split "$line" ","] "1"] != -1} { if {[info exists type] == 0} { set type "\00310[lindex [split "$line" "$ } } putquick "PRIVMSG $chan :\00310Stats for \00312$rsn\00310:" putquick "PRIVMSG $chan :$type" }