Someone
public text v1 · immutablepackage require http
bind pub - !stats firstsocket
proc firstsocket {nick userhost handle chan text} {
set type "Stats for $text:"
set site "http://hiscore.runescape.com/index_lite.ws?"
set url $site[http::formatQuery player $text]
set read [::http::data [::http::geturl $url -timeout 10000]]
foreach line [split $read \n] {
if {[lindex [split "$line" ","] "1"] != -1} { set type "$type [lindex [split "$line" ","] "1"]" }
}
putquick "PRIVMSG $chan :$type"
}