on *:TEXT:-scstat*:#:{ set %scstat.chan $chan sockclose scstat sockopen scstat $gettok($2,1,58) $gettok($2,2,58) } on *:SOCKOPEN:scstat:{ sockwrite -n $sockname GET /7.html HTTP/1.0 sockwrite -n $sockname User-Agent: Mozilla sockwrite -n $sockname $crlf } on *:sockread:scstat:{ if ($sockerr > 0) return :nextread sockread -f %scasttemp if ($sockbr == 0) return if (%scasttemp == $null) %scasttemp = empty set %scasttemp $remove(%scasttemp,,) if ((HTTP/1.* !iswm %scasttemp) && (content-type* !iswm %scasttemp) && (%scasttemp != empty)) { set %scstat.song $gettok(%scasttemp,7-,44) set %scstat.bitrate $gettok(%scasttemp,6,44) set %scstat.listeners $gettok(%scasttemp,1,44) set %scstat.maxlist $gettok(%scasttemp,4,44) set %scstat.peak $gettok(%scasttemp,3,44) if ($gettok(%scasttemp,2,44) == 1) set %scstat.livedj connected else set %scstat.livedj not connected ; changing some of the html codes back to regular characters set %scast.song $replace(%scast.song,&,$chr(38),',$chr(39)) } goto nextread } on *:sockclose:scstat:{ msg %scstat.chan DSP  $+ %scstat.livedj $+  and playing  $+ %scstat.song $+  msg %scstatchan  $+ %scstat.listeners $+  out of  $+ %scstat.maxlist $+  listeners at  $+ $+(%scstat.bitrate,Kb) $+  using up $+(,$round($calc(((%scstat.bitrate *1024) * %scstat.listeners)/ 1024 / 1024),2),Mb/s) or $+(,$round($calc(((%scstat.bitrate *1024) * %scstat.listeners)/ 1024 ),2),Kb/s) or $+(,$round($calc(((%scstat.bitrate *1024) * %scstat.listeners)/ 1024 / 8),2),KB/s) msg %scstat.chan You can listen at $+(http://,%scstat.host,:,%scstat.port,/listen.pls) }