Shoutcast Socket Script issues ...Please help - 26/08/09 06:59 PM
Hi i am trying to find a script "that actualy works" that can display info about my Shoutcast stream. I have seen MANY in action in channels all across IRC and i cant find a single one that seems to work for me. I have at least 5 of them i been working with and cant get 4 of them to do a damn thing and the 5th one says scoket closed....lol with the spelling error and all
So i am back here asking the real pros...What can you do to help me get this working? Anyone have just a basic shoutcast socket script that we can all work on or maybe you know of one that already works and is nice ?? Please help
Here is the script i was trying most recent that was saying closed socket...
I am a little unclear on what to edit in these lines
Hope thats right
So i am back here asking the real pros...What can you do to help me get this working? Anyone have just a basic shoutcast socket script that we can all work on or maybe you know of one that already works and is nice ?? Please help
Here is the script i was trying most recent that was saying closed socket...
I am a little unclear on what to edit in these lines
Code:
if ($1 = user) { return ***** } I did it like if ($1 = user) { return Username }
Hope thats right
Code:
;######################################### ; Modify User/Pass/Host/Port then use ; "/cshout" to connect and fill hash table ; YOU WILL GET * Line too long: $+ ERRORS! ; what can i say, im lazy and mIRC SUX! ;######################################### alias ShoutData { if ($isid) { if ($1 = user) { return ***** } if ($1 = pass) { return ***** } if ($1 = host) { return ***** } if ($1 = port) { return ***** } if ($1 = Accept) { return CURRENTLISTENERS;PEAKLISTENERS;MAXLISTENERS;REPORTEDLISTENERS;AVERAGETIME;SERVERGENRE;SERVERURL;SERVERTITLE;SONGTITLE;SONGURL;IRC;ICQ;AIM;WEBHITS;STREAMHITS;STREAMSTATUS;BITRATE;CONTENT;VERSION;INDEX;LISTEN;PALM7;LOGIN;LOGINFAIL;PLAYED;ADMIN;UPDINFO } } } ;######################################### ; $ShoutInfo(<data>) Improper use of this ; alias will return all possible choices ; Just look at the Accept in ShoutData ;######################################### alias ShoutInfo { if ($istok($shoutdata(accept),$1,59)) { return $hget(ShoutInfo,$1) } else { return *** Improper Usage: use one of the following: $shoutdata(accept) } } alias SShout { sockwrite -n $1- } alias CShout { hfree -w ShoutInfo | sockopen ShoutCast $ShoutData(host) $ShoutData(port) } on *:sockclose:ShoutCast: { echo -a Closed Scoket? } on *:sockopen:ShoutCast: { if ($sockerr > 0) { sockclose $sockname | return } else { SShout $sockname GET /admin.cgi?mode=viewxml HTTP/1.1 SShout $sockname Authorization: Basic $encode($+($ShoutData(user),:,$ShoutData(pass)),m) SShout $sockname Referer: $+(http://,$ShoutData(host),:,$ShoutData(port)) SShout $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322) SShout $sockname Host: $+($ShoutData(host),:,$ShoutData(port)) SShout $sockname Connection: Keep-Alive $+ $str($crlf,2) } } on *:sockread:ShoutCast: { if ($sockerr > 0) return :nextread | sockread -f %temp if ($sockbr == 0) return var %match = $regsub(%temp,/^HTTP\/1\.0 200 OK/g,$null,%temp) var %match = $regsub(%temp,/^Content\-Type\:text\/xml/g,$null,%temp) var %MaxLen = 900 | dec %MaxLen $len(%BackBuffer) var %Srch = $+(%BackBuffer,$mid(%temp,1,%MaxLen)) inc %MaxLen | var %BackBuffer = $mid(%temp,%MaxLen) var %match = $regex(ShoutData,%Srch,/<(\w+?)>(.*?)<\/\1?>/msg) var %x = 0 , %y = 1 | while (%x < %match) { inc %x if ($istok($shoutdata(accept),$regml(ShoutData,%y),59)) { hadd -m ShoutInfo $regml(ShoutData,%y) $regml(ShoutData,$calc(%y + 1)) } inc %y 2 } %match = $regsub(%temp,/<(\w+?)>.*?<\/\1?>/g,$null,%temp) if (%temp) { var %match = $regsub(%temp,/<\?[^>]>/g,$null,%temp) var %match = $regsub(%temp,/<\![^>]>/g,$null,%temp) %BackBuffer = $+(%BackBuffer,%temp) } goto nextread }