<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/19391" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2013-09-05T07:47:12-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/19391</id>

		<entry>
		<author><name><![CDATA[Beetspeed]]></name></author>
		<updated>2013-09-05T07:47:12-04:00</updated>

		<published>2013-09-05T07:47:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102017#p102017</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102017#p102017"/>
		<title type="html"><![CDATA[problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102017#p102017"><![CDATA[
There is nothing wrong about that script, i use this script for many years<br><br>the only thnig you must do is take youre time to fill in the right things<br><br>set radiochans "#chan" <br>set adminchans "#chan" <br>set streamip "ip" <br>set streamport "port" <br>set streampass "passwd" <br><br>example<br>set radiochans "" <br>set adminchans "#radio4all" <br>set streamip "102.10.23.33" <br>set streamport "20351" <br>set streampass "radio4all"<br><br>this are the thnigs you get from you're streamserver<br><br>Have you also mirc room? you need additionel to change/put in eggdrop.config the mirc server, port en room name <br><br>if you want i can send you the eggdrop complete to you<br><br>greetings<br>Beetspeed on irc2.chattersweb.nl room #chat4all so you can see how it works<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12274">Beetspeed</a> — Thu Sep 05, 2013 7:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-04-02T16:51:42-04:00</updated>

		<published>2013-04-02T16:51:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101356#p101356</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101356#p101356"/>
		<title type="html"><![CDATA[Re: Thanks for replying]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101356#p101356"><![CDATA[
<blockquote class="uncited"><div>&lt;(Radio&gt; [07:41] invalid command name "}"</div></blockquote>oops... I fixed that in the above post.. my bad. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Tue Apr 02, 2013 4:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gamble27]]></name></author>
		<updated>2013-04-02T03:54:08-04:00</updated>

		<published>2013-04-02T03:54:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101353#p101353</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101353#p101353"/>
		<title type="html"><![CDATA[Thanks for replying]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101353#p101353"><![CDATA[
Above pasted tcl by speechles is invoking below pasted error :<blockquote class="uncited"><div>[15:41] &lt;(Radio&gt; [07:41] Tcl error in file 'radio.conf':<br>[15:41] &lt;(Radio&gt; [07:41] invalid command name "}"<br>[15:41] &lt;(Radio&gt;     while executing<br>[15:41] &lt;(Radio&gt; "} "<br>[15:41] &lt;(Radio&gt;     (file "scripts/radio.tcl" line 764)<br>[15:41] &lt;(Radio&gt;     invoked from within<br>[15:41] &lt;(Radio&gt; "source scripts/radio.tcl"<br>[15:41] &lt;(Radio&gt;     (file "radio.conf" line 1054)<br>[15:41] &lt;(Radio&gt; [07:41] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)</div></blockquote>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10110">gamble27</a> — Tue Apr 02, 2013 3:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2013-04-02T16:50:15-04:00</updated>

		<published>2013-04-01T15:48:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101345#p101345</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101345#p101345"/>
		<title type="html"><![CDATA[Re: Thanks for replying]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101345#p101345"><![CDATA[
<blockquote class="uncited"><div>I have tried your tcl madalin, but its a little too simple and my eggdrop keep getting ping timeout when i uses your tcl. Domsen tcl is perfect but unfortunately it is displaying the above stated error.</div></blockquote>Okay, the script had 3 places really where streamstatus is checked when it's possible it may not even exist. It also had numerous other obvious errors. All these are corrected in the below script. It uses [expr] in a very unsafe way within its shrink procedure, but it uses it against data obtained from shoutcast itself so it should be unable to exploit your bot. To change this would require too much work, over 70% of the script would have to be rewritten. So here is a version that should work, it just could work faster with a better written parser....<br><div class="codebox"><p>Code: </p><pre><code># shoutcast.tcl v1.03XXX by domsen &lt;domsen@domsen.org&gt; (c)2o13## comments? bugs? ideas? requests? money? beer?# plz mail me or visit my homepage @ www.domsen.org# visit #newsticker@ircnet### whats this script all about?# -----------------------------## this script is for all the online radio admins out there. it announces serveral# stuff like the status of your radio, the current song, new listener peaks,# the current listeners and much much more to the channels you want.# the users can get infos by public and msg command, too, like the stream url,# stream stats, the last played songs, the current song, the dj... and much much# more.# also the bot informs the users about the current dj, whenever he changes or# a certain command is triggered. the dj name doesnt need to be your nickname,# so you can also call yourself "goethe mc" even if your irc nickname is# [gay]michael. the good thing about this is: nobody knows your nickname, so# you wont get unwanted querys with wishes and greets. the dj can also change# his nickname and the wish- and greet-feature will still work fine.# only users with the flag +D can be djs, so make sure to give this flag to# your djs -&gt; .chattr djnick +D in the partyline.## the script also changes the topic when your stream goes on or offline and# sends a public message, which is fully costumizeable. try it out yourself# and maybe it suits your needs :)## it was tested with shoutcast 1.9.2 on debian linux.## NOTE 1: make sure youve got a good connection from your shellserver to your# streamserver - if its the same server then thats very very good. the bot# checks every minute if something happened, so if the connection is not fast# the bot will lag like hell or timeout. make sure to change your settings# for the eggdrop floodprotection.## NOTE 2: read the text here carefully, i get many many emails asking questions# which are acutally answered in this manual here. dont expect me to answer# these mails. :P### script history:# ----------------## v1.03 - different variables in the texts/topics possible#       - possibility to unset the dj#   - splitted the scripts chans in 'radiochans' and 'adminchans'#   - 'advertiseonlyifonline'-function#   - possibility to get a msg if the bot goes down#   - more regexes#   - some bugfixes# v1.02 - added the .listener command, corrected some typos ;&gt;# v1.01 - fixed a string i forgot to replace# v1.0  - first public release#### what does what config option mean/do?# --------------------------------------## radiochans - the channels the tcl is active in, "" for all, or "#chan1 #chan2"# adminchans - the channels the admin commands work in## streamip - the ip of your radio# streamport - the port of your radio# streampass - the admin pass of your radio## scstatstrigger - the trigger for the radio stats# scplayingtrigger - shows the song the radio is playing now# sclistenertrigger - shows the current listenercount# scdjtrigger - shows the current dj name# scstreamtrigger - shows your stream url -&gt; streamtext# scsetdjtrigger - sets the current dj name, this doesnt have to be your nickname.#                  your nick will be saved too and all wishes and greets will be#                  redirected to this nickname. only availavle for ppl with the +D#                  flag.# scunsetdjtrigger - unsets the current dj, needs the +D flag# scwishtrigger - the command which the users can use if they wish a certain song# scgreettrigger - the command which users can use if the want to greet sb# sclastsongstrigger - the commands which users can use if they want to see the#                      songhistory# schelptrigger - shows the available commands## alertadmin - the userhandle of the user who will get a msg if the server goes down# doalertadmin - 1 if you want to get a msg if the server goes offline, 0 if you#       dont. this is done through the bots notes system because its#       more comfortable and persistent this way.## announce - shall the bot announce any stuff? 1 for yes, 0 for no# urltopic - shall the bot change the topic everytime the radio goes on or off?# tellsongs - shall the bot post the songtitle to the channels everytime a#             new song starts?# tellusers - shall the bot post the number of current users to the channel#             everytime it changes or a new user maximum is reached?# tellbitrate - shall the bot announce bitrate changes?## offlinetext - the reason the bot says when the radio goes offline# offlinetopic - the topic which is set when the radio goes offline## onlinetext - the reason the bot says when the radio goes online# onlinetopic - the topic which is set when the radio goes online## streamtext - the text with your stream infos# advertise - shall the bot advertist the advertisetext?# advertiseonlyifonline - 1 if the bot only should advertise the radio if the stream#           is up and running, 0 for all-the-time advertisement# advertisetext - the text the bot will post once every 10 minutes.#### how do i put veriables in the different texts and topics?# ----------------------------------------------------------## the script knows the following variables which can be used in the offlinetext,# offlinetopic, onlinetext, onlinetopic, streamtext and advertisetext:## /dj/ - the djnickname# /sgenre/ - the servers music genre# /stitle/ - the streamtitle# /surl/ - the servers url# /bitrate/ - the current streaming bitrate# /curlist/ - current listeners# /curhigh/ - current listener peak# /cursong/ - the current song# $streamip - the streams ip# $streamport - the streams port#### known bugs:# ------------## -numbers in the songhistory are killed, this is a xml sourcecode problem# -öäü are not shown correctly in the songtitles, because xml replaces each#  of them with the same chars, so i cant fix it :( bitnapper told me it#  would work anyway, but i cant confirm it. maybe my shoutcast version sucks.#  the string replacements are included, so if it works youre a lucky guy.### loser of the day:# ------------------## loops aka edema for ripping the whole script, removing all of my copyright# infos and comments and putting his name under it. yeah, thats the open source# spirit...#### config ##########################set radiochans "#chan"set adminchans "#chan"set streamip "ip"set streamport "port"set streampass "passwd"set scstatstrigger ".stats"set scstreamtrigger ".stream"set scplayingtrigger ".playing"set sclistenertrigger ".listener"set scdjtrigger ".dj"set scsetdjtrigger ".setdj"set scunsetdjtrigger ".unsetdj"set scwishtrigger ".wish"set scgreettrigger ".greet"set sclastsongstrigger ".lastsongs"set schelptrigger ".help"set alertadmin ""set doalertadmin "1"set announce "1"set urltopic "1"set ctodjc "1"set tellsongs "1"set tellusers "1"set tellbitrate "1"set advertise "1"set advertiseonlyifonline "1"set offlinetext "going offline now"set offlinetopic "visit our website @ www.domsen.org"set onlinetext "/stitle/ now online @ /surl/ with /bitrate/kbits"set onlinetopic "/dj/@/stitle/ @ /surl/ streaming at /bitrate/kbits"set streamtext "tune in /dj/ @ http://$streamip:$streamport/listen.pls"set advertisetext "stream @ http://$streamip:$streamport/listen.pls - powered by www.domsen.org"# end of config #####################bind pub - $scstatstrigger  pub_scstatbind msg - $scstatstrigger  msg_scstatbind pub - $scplayingtrigger  pub_playingbind msg - $scplayingtrigger  msg_playingbind pub - $scdjtrigger  pub_djbind msg - $scdjtrigger  msg_djbind pub D $scsetdjtrigger  pub_setdjbind msg D $scsetdjtrigger  msg_setdjbind pub D $scunsetdjtrigger  pub_unsetdjbind msg D $scunsetdjtrigger  msg_unsetdjbind pub - $scwishtrigger  pub_wishbind msg - $scwishtrigger  msg_wishbind pub - $scgreettrigger  pub_greetbind msg - $scgreettrigger  msg_greetbind pub - $scstreamtrigger pub_streambind msg - $scstreamtrigger msg_streambind pub - $sclastsongstrigger pub_lastsongsbind msg - $sclastsongstrigger msg_lastsongsbind pub - $sclistenertrigger pub_listenerbind msg - $sclistenertrigger msg_listenerbind pub - $schelptrigger pub_helpbind msg - $schelptrigger msg_helpbind time - "* * * * *" isonlinebind time - "?0 * * * *" advertisebind nick D * djnickchangeset dj ""set surl ""set bitrate ""set stitle ""if {[file exists dj]} {   set temp [open "dj" r]   set dj [gets $temp]   close $temp}proc shrink { calc number string start bl} { return [expr [string first "$string" $bl $start] $calc $number] }proc status { } {   global streamip streamport streampass   if {[catch {set sock [socket $streamip $streamport] } sockerror]} {      putlog "error: $sockerror"      return 0 } else {      puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"      puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"      puts $sock "Host: $streamip"      puts $sock "Connection: close"      puts $sock ""      flush $sock      while {[eof $sock] != 1} {         set bl [gets $sock]         if { [string first "standalone" $bl] != -1 } {            set streamstatus [string range $bl [shrink + 14 "&lt;STREAMSTATUS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMSTATUS&gt;" 0 $bl]]         }      }      close $sock   }   if {[info exists streamstatus]} {      if { $streamstatus == "1" } { return 1 } else { return 0 }   } else { return 0 }}proc poststuff { mode text } {   global radiochans dj   set curlist "0"   set curhigh "0"   set surl ""   set cursong ""   set sgenre ""   set bitrate "0"   set stitle ""   set temp [open "isonline" r]   while {[eof $temp] != 1} {      set zeile [gets $temp]      if {[string first "curlist:" $zeile] != -1 } { set curlist $zeile }      if {[string first "curhigh:" $zeile] != -1 } { set curhigh $zeile }      if {[string first "cursong:" $zeile] != -1 } { set cursong [lrange $zeile 1 [llength $zeile]] }      if {[string first "sgenre:" $zeile] != -1 } { set sgenre [lrange $zeile 1 [llength $zeile]]}      if {[string first "serverurl:" $zeile] != -1 } { set surl [lindex $zeile 1] }      if {[string first "bitrate:" $zeile] != -1 } { set bitrate [lindex $zeile 1] }      if {[string first "stitle:" $zeile] != -1 } { set stitle [lindex $zeile 1] }   }   close $temp   regsub -all "/stitle/" $text "$stitle" text   regsub -all "/curlist/" $text "$curlist" text   regsub -all "/curhigh/" $text "$curhigh" text   regsub -all "/cursong/" $text "$cursong" text   regsub -all "/sgenre/" $text "$sgenre" text   regsub -all "/surl/" $text "$surl" text   regsub -all "/bitrate/" $text "$bitrate" text   regsub -all "/dj/" $text "$dj" text   foreach chan [channels] {      if {$radiochans == "" } { putserv "$mode $chan :$text" }      if {$radiochans != "" } {         if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1)} {putserv "$mode $chan :$text"}      }   }}proc schelp { target } {   global scstatstrigger scstreamtrigger scplayingtrigger scdjtrigger sclastsongstrigger scwishtrigger scgreettrigger sclistenertrigger   putserv "notice $target :the following commands are available:"   putserv "notice $target :$scstatstrigger - $scstreamtrigger - $scplayingtrigger - $scdjtrigger - $sclastsongstrigger - $scwishtrigger - $scgreettrigger - $sclistenertrigger"   putserv "notice $target :shoutcast.tcl by domsen &lt;domsen@domsen.org&gt;"}proc msg_help {nick uhost hand arg} {   schelp $nick}proc pub_help {nick uhost hand chan arg} {   global radiochans   if {$radiochans == "" } { schelp $nick }   if {$radiochans != "" } {      if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { schelp $nick}   }}proc advertise { nick uhost hand chan arg } {   global advertisetext advertise advertiseonlyifonline   if {$advertise == "1" &amp;&amp; $advertiseonlyifonline == "0"} { poststuff privmsg "$advertisetext" }   if {$advertise == "1" &amp;&amp; $advertiseonlyifonline == "1" &amp;&amp; [status] == 1} { poststuff privmsg "$advertisetext" }}proc setdj {nickname djnickname } {   if {$djnickname == "" } { set djnickname $nickname }   global streamip streamport streampass dj   putlog "shoutcast: new dj: $djnickname ($nickname)"   set temp [open "dj" w+]   puts $temp $djnickname   close $temp   set temp [open "djnick" w+]   puts $temp $nickname   close $temp   if { [status] == "1" } { poststuff privmsg "$djnickname is now rocking the turntables, enjoy."      if { $::ctodjc == "1" } {         set temp [open "isonline" r]         while {[eof $temp] != 1} {            set zeile [gets $temp]            if {[string first "isonline:" $zeile] != -1 } { set oldisonline $zeile }            if {[string first "curlist:" $zeile] != -1 } { set oldcurlist $zeile }            if {[string first "curhigh:" $zeile] != -1 } { set oldcurhigh $zeile }            if {[string first "cursong:" $zeile] != -1 } { set oldsong $zeile }            if {[string first "bitrate:" $zeile] != -1 } { set oldbitrate $zeile }         }         close $temp      }   } else {      putserv "privmsg $nickname :this has not been announced because the radio is currentlfy offline."   }}proc msg_setdj { nick uhost hand arg } { setdj $nick $arg }proc pub_setdj { nick uhost hand chan arg } { global adminchans; if {([lsearch -exact [string tolower $adminchans] [string tolower $chan]] != -1) || ($adminchans == "")} { setdj $nick $arg }}proc unsetdj { nick } {   global dj   set dj ""   file delete dj   putserv "notice $nick :dj deleted"}proc msg_unsetdj { nick uhost hand arg } { unsetdj $nick }proc pub_unsetdj { nick uhost hand chan arg } { global adminchans; if {([lsearch -exact [string tolower $adminchans] [string tolower $chan]] != -1) || ($adminchans == "")} { unsetdj $nick }}proc listener { target } {   global streamip streamport streampass   putlog "shoutcast: $target requested listener count"   if {[catch {set sock [socket $streamip $streamport] } sockerror]} {      putlog "error: $sockerror"      return 0 } else {      puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"      puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"      puts $sock "Host: $streamip"      puts $sock "Connection: close"      puts $sock ""      flush $sock      while {[eof $sock] != 1} {         set bl [gets $sock]         if { [string first "standalone" $bl] != -1 } {            set repl [string range $bl [shrink + 19 "&lt;REPORTEDLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/REPORTEDLISTENERS&gt;" 0 $bl]]            set curhigh [string range $bl [shrink + 15 "&lt;PEAKLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/PEAKLISTENERS&gt;" 0 $bl]]            set maxl [string range $bl [shrink + 14 "&lt;MAXLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/MAXLISTENERS&gt;" 0 $bl]]            set avgtime [string range $bl [shrink + 13 "&lt;AVERAGETIME&gt;" 0 $bl] [shrink - 1 "&lt;/AVERAGETIME&gt;" 0 $bl]]         }      }      close $sock      putserv "notice $target :there are currently $repl unique people listening, the listener maximum is $maxl, our user peak was at $curhigh listeners, the listening time average is $avgtime"   }}proc msg_listener { nick uhost hand arg } { listener $nick }proc pub_listener { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { listener $nick  }}proc wish { nick arg } {   if {$arg == ""} { putserv "notice $nick :you forgot to add your wish"; return 0}   if { [status] == "1" } {      set temp [open "djnick" r]      set djnick [gets $temp]      close $temp      putserv "privmsg $djnick :(WISH) - $nick - $arg"   } else {      putserv "notice $nick :sorry radio is currently offline"   }}proc msg_wish { nick uhost hand arg } { wish $nick $arg }proc pub_wish { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { wish $nick $arg }}proc sclastsongs { target } {   global streamip streamport streampass   putlog "shoutcast: $target requested songhistory"   if {[catch {set sock [socket $streamip $streamport] } sockerror]} {      putlog "error: $sockerror"      return 0 } else {      puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"      puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"      puts $sock "Host: $streamip"      puts $sock "Connection: close"      puts $sock ""      flush $sock      while {[eof $sock] != 1} {         set bl [gets $sock]         if { [string first "standalone" $bl] != -1 } {            set songs [string range $bl [string first "&lt;TITLE&gt;" $bl] [expr {[string last "&lt;/TITLE&gt;" $bl] + 7}]]            regsub -all "&lt;" $songs "&lt;" songs            regsub -all "&gt;" $songs "&gt;" songs            regsub -all "&amp;" $songs "+" songs            regsub -all """ $songs """ songs            regsub -all "'" $songs "'" songs            regsub -all "ÿ" $songs "" songs            regsub -all "&lt;TITLE&gt;" $songs "(" songs            regsub -all "&lt;/TITLE&gt;" $songs ")" songs            regsub -all "&lt;SONG&gt;" $songs "" songs            regsub -all "&lt;/SONG&gt;" $songs " - " songs            regsub -all "&lt;PLAYEDAT&gt;" $songs "" songs            regsub -all "&lt;/PLAYEDAT&gt;" $songs "" songs            regsub -all {\d} $songs "" songs            regsub -all "´" $songs "´" songs            regsub -all "&amp;#x96;" $songs "-" songs            regsub -all "ö" $songs "ö" songs            regsub -all "ä" $songs "ä" songs            regsub -all "ü" $songs "ü" songs            regsub -all "Ö" $songs "Ö" songs            regsub -all "Ä" $songs "Ä" songs            regsub -all "Ü" $songs "Ü" songs            regsub -all "ß" $songs "ß" songs         }      }      close $sock      putserv "notice $target :$songs"   }}proc msg_lastsongs { nick uhost hand arg } { sclastsongs $nick }proc pub_lastsongs { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { sclastsongs $nick }}proc scstream { target } {   global streamip streamport streamtext   putlog "shoutcast: streaminfo requested by $target"   putserv "notice $target :$streamtext"}proc msg_stream { nick uhost hand arg } { scstream $nick }proc pub_stream { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstream $nick }}proc scgreet { nick arg } {   if {$arg == ""} { putserv "notice $nick :you forgot to add your greetmessage"; return 0}   if { [status] == "1" } {      set temp [open "djnick" r]      set djnick [gets $temp]      close $temp      putserv "privmsg $djnick :(GREET) - $nick - $arg"   } else {      putserv "notice $nick :sorry radio is currently offline"   }}proc msg_greet { nick uhost hand arg } { scgreet $nick $arg }proc pub_greet { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scgreet $nick $arg }}proc djnickchange { oldnick uhost hand chan newnick } {   set temp [open "djnick" r]   set djnick [gets $temp]   close $temp   if {$oldnick == $djnick} {      putlog "shoutcast: dj nickchange $oldnick -&gt; $newnick"      set temp [open "djnick" w+]      puts $temp $newnick      close $temp   }}proc dj { target } {   global streamip streamport streampass dj   putlog "shoutcast: $target asked for dj info"   if {[status] == 1} {      if {[file exists dj]} {         set temp [open "dj" r]         set dj [gets $temp]         close $temp         putserv "notice $target :$dj is at the turntables!"      } else { putserv "notice $target :sorry, no dj name available" }   } else { putserv "notice $target :sorry radio is currently offline" }}proc msg_dj { nick uhost hand arg } { dj $nick}proc pub_dj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { dj $nick  }}proc scstat {target} {   global streamip streamport streampass   putlog "shoutcast: $target asked for serverstats"   if {[catch {set sock [socket $streamip $streamport] } sockerror]} {      putlog "error: $sockerror"      return 0 } else {      puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"      puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"      puts $sock "Host: $streamip"      puts $sock "Connection: close"      puts $sock ""      flush $sock      while {[eof $sock] != 1} {         set bl [gets $sock]         if { [string first "standalone" $bl] != -1 } {            set streamstatus [string range $bl [shrink + 14 "&lt;STREAMSTATUS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMSTATUS&gt;" 0 $bl]]            set repl [string range $bl [shrink + 19 "&lt;REPORTEDLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/REPORTEDLISTENERS&gt;" 0 $bl]]            set curhigh [string range $bl [shrink + 15 "&lt;PEAKLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/PEAKLISTENERS&gt;" 0 $bl]]            set currentl [string range $bl [shrink + 18 "&lt;CURRENTLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/CURRENTLISTENERS&gt;" 0 $bl]]            set surl [string range $bl [shrink + 11 "&lt;SERVERURL&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERURL&gt;" 0 $bl]]            set maxl [string range $bl [shrink + 14 "&lt;MAXLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/MAXLISTENERS&gt;" 0 $bl]]            set bitrate [string range $bl [shrink + 9 "&lt;BITRATE&gt;" 0 $bl] [shrink - 1 "&lt;/BITRATE&gt;" 0 $bl]]            set stitle [string range $bl [shrink + 13 "&lt;SERVERTITLE&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERTITLE&gt;" 0 $bl]]            set sgenre [string range $bl [shrink + 13 "&lt;SERVERGENRE&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERGENRE&gt;" 0 $bl]]            if {$sgenre != ""} {set sgenre " ($sgenre)"}            set avgtime [string range $bl [shrink + 13 "&lt;AVERAGETIME&gt;" 0 $bl] [shrink - 1 "&lt;/AVERAGETIME&gt;" 0 $bl]]            set irc [string range $bl [shrink + 5 "&lt;IRC&gt;" 0 $bl] [shrink - 1 "&lt;/IRC&gt;" 0 $bl]]            set icq [string range $bl [shrink + 5 "&lt;ICQ&gt;" 0 $bl] [shrink - 1 "&lt;/ICQ&gt;" 0 $bl]]            if {$icq == 0} { set icq "N/A" }            set aim [string range $bl [shrink + 5 "&lt;AIM&gt;" 0 $bl] [shrink - 1 "&lt;/AIM&gt;" 0 $bl]]            set webhits [string range $bl [shrink + 9 "&lt;WEBHITS&gt;" 0 $bl] [shrink - 1 "&lt;/WEBHITS&gt;" 0 $bl]]            set streamhits [string range $bl [shrink + 12 "&lt;STREAMHITS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMHITS&gt;" 0 $bl]]            set version [string range $bl [shrink + 9 "&lt;VERSION&gt;" 0 $bl] [shrink - 1 "&lt;/VERSION&gt;" 0 $bl]]            if {$streamstatus == 1} {               if {[file exists dj]} {                  set temp [open "dj" r]                  set dj [gets $temp]                  close $temp               } else { set dj "none" }               putserv "notice $target :$stitle$sgenre is online, running shoutcast $version and streaming at $bitrate kbps,  your dj is $dj. please visit $surl"            } else {               putserv "notice $target :$stitle$sgenre is currenty offline, running shoutcast $version and streaming at $bitrate kbps, check out $surl" }            putserv "notice $target :there are currently $repl unique people listening, the listener maximum is $maxl, our user peak was at $curhigh listeners."            putserv "notice $target :the average user is listening $avgtime seconds, our stream had $webhits webhits and $streamhits streamhits."            putserv "notice $target :you can contact the team by irc on $irc, via aim at $aim and with icq by the uin $icq."         }      }      close $sock   }}proc msg_scstat { nick uhost hand arg } { scstat $nick}proc pub_scstat { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstat $nick  }}proc playing {target} {   global streamip streamport streampass dj   putlog "shoutcast: $target asked for current song"   if {[catch {set sock [socket $streamip $streamport] } sockerror]} {      putlog "error: $sockerror"      return 0 } else {      puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"      puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"      puts $sock "Host: $streamip"      puts $sock "Connection: close"      puts $sock ""      flush $sock      while {[eof $sock] != 1} {         set bl [gets $sock]         if { [string first "standalone" $bl] != -1 } {            set streamstatus [string range $bl [shrink + 14 "&lt;STREAMSTATUS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMSTATUS&gt;" 0 $bl]]            set songtitle [string range $bl [shrink + 11 "&lt;SONGTITLE" 0 $bl] [shrink - 1 "&lt;/SONGTITLE&gt;" 0 $bl]]            set songurl [string range $bl [shrink + 9 "&lt;SONGURL&gt;" 0 $bl] [shrink - 1 "&lt;/SONGURL&gt;" 0 $bl]]            if {$songurl != ""} { set songurl " ($songurl)"}            regsub -all "&lt;" $songtitle "&lt;" songtitle            regsub -all "&gt;" $songtitle "&gt;" songtitle            regsub -all "&amp;" $songtitle "+" songtitle            regsub -all """ $songtitle """ songtitle            regsub -all "'" $songtitle "'" songtitle            regsub -all "ÿ" $songtitle "" songtitle            regsub -all "´" $songtitle "´" songtitle            regsub -all "&amp;#x96;" $songtitle "-" songtitle            regsub -all "ö" $songtitle "ö" songtitle            regsub -all "ä" $songtitle "ä" songtitle            regsub -all "ü" $songtitle "ü" songtitle            regsub -all "Ö" $songtitle "Ö" songtitle            regsub -all "Ä" $songtitle "Ä" songtitle            regsub -all "Ü" $songtitle "Ü" songtitle            regsub -all "ß" $songtitle "ß" songtitle            if {[info exists streamstatus]} {               if {$streamstatus == 1} {                  putserv "notice $target :now playing $songtitle$songurl"               } else {                  putserv "notice $target :server is currently offline, sorry"               }            } else { putserv "notice $target :server is currently offline, sorry" }         }      }      close $sock   }}proc msg_playing { nick uhost hand arg } { playing $nick}proc pub_playing { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { playing $nick  }}proc isonline { nick uhost hand chan arg } {   global radiochans announce tellusers tellsongs tellbitrate urltopic dj   global offlinetext offlinetopic onlinetext onlinetopic   global streamip streampass streamport dj   global doalertadmin alertadmin   if {$announce == 1 || $tellsongs == 1 || $tellusers == 1 || $tellbitrate == 1} {      set isonlinefile "isonline"      set oldisonline "isonline: 0"      set oldcurlist "curlist: 0"      set oldcurhigh "curhigh: 0"      set oldsong "cursong: 0"      set oldbitrate "bitrate: 0"      if {[file exists $isonlinefile]} {         putlog "shoutcast: checking if stream is online"         set temp [open "isonline" r]         while {[eof $temp] != 1} {            set zeile [gets $temp]            if {[string first "isonline:" $zeile] != -1 } { set oldisonline $zeile }            if {[string first "curlist:" $zeile] != -1 } { set oldcurlist $zeile }            if {[string first "curhigh:" $zeile] != -1 } { set oldcurhigh $zeile }            if {[string first "cursong:" $zeile] != -1 } { set oldsong $zeile }            if {[string first "bitrate:" $zeile] != -1 } { set oldbitrate $zeile }         }         close $temp      }      if {[catch {set sock [socket $streamip $streamport] } sockerror]} {         putlog "error: $sockerror"         return 0} else {         puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"         puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"         puts $sock "Host: $streamip"         puts $sock "Connection: close"         puts $sock ""         flush $sock         while {[eof $sock] != 1} {            set bl [gets $sock]            if { [string first "standalone" $bl] != -1 } {               set streamstatus "isonline: [string range $bl [shrink + 14 "&lt;STREAMSTATUS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMSTATUS&gt;" 0 $bl]]"               set repl "curlist: [string range $bl [shrink + 19 "&lt;REPORTEDLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/REPORTEDLISTENERS&gt;" 0 $bl]]"               set curhigh "curhigh: [string range $bl [shrink + 15 "&lt;PEAKLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/PEAKLISTENERS&gt;" 0 $bl]]"               set currentl [string range $bl [shrink + 18 "&lt;CURRENTLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/CURRENTLISTENERS&gt;" 0 $bl]]               set surl "serverurl: [string range $bl [shrink + 11 "&lt;SERVERURL&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERURL&gt;" 0 $bl]]"               set cursong "cursong: [string range $bl [shrink + 11 "&lt;SONGTITLE" 0 $bl] [shrink - 1 "&lt;/SONGTITLE&gt;" 0 $bl]]"               set songurl [string range $bl [shrink + 9 "&lt;SONGURL&gt;" 0 $bl] [shrink - 1 "&lt;/SONGURL&gt;" 0 $bl]]               set bitrate "bitrate: [string range $bl [shrink + 9 "&lt;BITRATE&gt;" 0 $bl] [shrink - 1 "&lt;/BITRATE&gt;" 0 $bl]]"               set stitle "stitle: [string range $bl [shrink + 13 "&lt;SERVERTITLE&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERTITLE&gt;" 0 $bl]]"               set sgenre "sgenre: [string range $bl [shrink + 13 "&lt;SERVERGENRE&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERGENRE&gt;" 0 $bl]]"            }         }         close $sock      }      set temp [open "isonline" w+]      puts $temp "$streamstatus\n$repl\n$curhigh\n$cursong\n$bitrate\n$stitle\n$sgenre\n$surl"      close $temp      if {$announce == 1 } {         if {![info exists streamstatus]} { poststuff privmsg $offlinetext }         if {$streamstatus == "isonline: 0" &amp;&amp; $oldisonline == "isonline: 1"} {            poststuff privmsg $offlinetext            if {$doalertadmin == "1"} { sendnote domsen $alertadmin "radio is now offline" }            if {$urltopic == 1} { poststuff topic $offlinetopic }         }         if {$streamstatus == "isonline: 1" &amp;&amp; $oldisonline == "isonline: 0" } {            if {$sgenre != ""} {               set sgenre " ([lrange $sgenre 1 [llength $sgenre]] )"            }            poststuff privmsg "$onlinetext"            if {$urltopic == 1} { poststuff topic "$onlinetopic" }         }      }      if {($tellusers == 1) &amp;&amp; ($streamstatus == "isonline: 1") &amp;&amp; ($oldcurhigh != "curhigh: 0") } {         if {$oldcurhigh != $curhigh} {            poststuff privmsg "new listener peak: [lindex $curhigh 1]"         }         if {$oldcurlist != $repl} {            poststuff privmsg "there are currently [lindex $repl 1] ($currentl) people listening"         }      }      if {($tellsongs == 1) &amp;&amp; ($oldsong != $cursong) &amp;&amp; ($streamstatus == "isonline: 1") } {         if {$songurl != ""} { set songurl " ($songurl)"}         regsub -all "&lt;" $cursong "&lt;" cursong         regsub -all "&gt;" $cursong "&gt;" cursong         regsub -all "&amp;" $cursong "+" cursong         regsub -all """ $cursong """ cursong         regsub -all "'" $cursong "'" cursong         regsub -all "ÿ" $cursong "" cursong         regsub -all "´" $cursong "´" cursong         regsub -all "&amp;#x96;" $cursong "-" cursong         regsub -all "ö" $cursong "ö" cursong         regsub -all "ä" $cursong "ä" cursong         regsub -all "ü" $cursong "ü" cursong         regsub -all "Ö" $cursong "Ö" cursong         regsub -all "Ä" $cursong "Ä" cursong         regsub -all "Ü" $cursong "Ü" cursong         regsub -all "ß" $cursong "ß" cursong         putlog $cursong         poststuff privmsg "now playing: [lrange $cursong 1 [llength $cursong]]$songurl"      }      if {($tellbitrate == 1) &amp;&amp; ($oldbitrate != $bitrate) &amp;&amp; ($streamstatus == "isonline: 1") &amp;&amp; ($oldbitrate != "bitrate: 0")} {         poststuff privmsg "bitrate switched to [lindex $bitrate 1]kbps"      }   }}putlog "*** shoutcast.tcl v1.03XXX by domsen &lt;domsen@domsen.org&gt; succesfully loaded. turn it up baby."</code></pre></div>Edit: Corrected problem below.. oops..  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Apr 01, 2013 3:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gamble27]]></name></author>
		<updated>2013-04-01T04:17:31-04:00</updated>

		<published>2013-04-01T04:17:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101331#p101331</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101331#p101331"/>
		<title type="html"><![CDATA[Thanks for replying]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101331#p101331"><![CDATA[
I have tried your tcl madalin, but its a little too simple and my eggdrop keep getting ping timeout when i uses your tcl. Domsen tcl is perfect but unfortunately it is displaying the above stated error.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10110">gamble27</a> — Mon Apr 01, 2013 4:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Madalin]]></name></author>
		<updated>2013-03-31T11:58:44-04:00</updated>

		<published>2013-03-31T11:58:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101317#p101317</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101317#p101317"/>
		<title type="html"><![CDATA[problem in shoutcast by domsen 1.03]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101317#p101317"><![CDATA[
Have you tryed my version of radio tcl script?<br><br><a href="http://www.egghelp.org/tclhtml/3478-4-0-0-1-radio.htm" class="postlink">http://www.egghelp.org/tclhtml/3478-4-0-0-1-radio.htm</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6396">Madalin</a> — Sun Mar 31, 2013 11:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gamble27]]></name></author>
		<updated>2013-03-31T05:52:07-04:00</updated>

		<published>2013-03-31T05:52:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101314#p101314</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101314#p101314"/>
		<title type="html"><![CDATA[Any help ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101314#p101314"><![CDATA[
Waiting for some kind soul to assist,thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10110">gamble27</a> — Sun Mar 31, 2013 5:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gamble27]]></name></author>
		<updated>2013-03-29T00:21:22-04:00</updated>

		<published>2013-03-29T00:21:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101310#p101310</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101310#p101310"/>
		<title type="html"><![CDATA[Thanks for replying]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101310#p101310"><![CDATA[
I have tried looking for the author but  didnt manage to find him, even his website is not working :&lt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10110">gamble27</a> — Fri Mar 29, 2013 12:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-03-28T02:00:51-04:00</updated>

		<published>2013-03-28T02:00:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101308#p101308</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101308#p101308"/>
		<title type="html"><![CDATA[problem in shoutcast by domsen 1.03]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101308#p101308"><![CDATA[
&lt;Off topic&gt;<br>And you can't just edit his post and add the code tags yourself? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> I do this every time I see a topic where the user forgot or doesn't know how to do it.<br><br>Same goes with removing unnecessary quotes of people that quote the post mentioned above his own. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br>&lt;On topic&gt;<br>Have you tried contacting the author letting him know about the error?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Mar 28, 2013 2:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gamble27]]></name></author>
		<updated>2013-03-28T00:28:15-04:00</updated>

		<published>2013-03-28T00:28:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101306#p101306</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101306#p101306"/>
		<title type="html"><![CDATA[problem in shoutcast by domsen 1.03]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101306#p101306"><![CDATA[
<strong class="text-strong">shoutcast: checking if stream is online<br> [04:24] Tcl error [isonline]: can't read "streamstatus": no such variable</strong><br><br>The above error is what i get after installing domsen shoucast ver 1.03 which i downloaded from egghelp itself. Plz assist, any kinda assistances will be appreciated. Thanks<br><br>Below pasted is the code involved,Thanks<div class="codebox"><p>Code: </p><pre><code># shoutcast.tcl v1.03 by domsen &lt;domsen@domsen.org&gt; (c)2oo5## comments? bugs? ideas? requests? money? beer? # plz mail me or visit my homepage @ www.domsen.org# visit #newsticker@ircnet### whats this script all about?# -----------------------------## this script is for all the online radio admins out there. it announces serveral# stuff like the status of your radio, the current song, new listener peaks,# the current listeners and much much more to the channels you want.# the users can get infos by public and msg command, too, like the stream url,# stream stats, the last played songs, the current song, the dj... and much much# more.# also the bot informs the users about the current dj, whenever he changes or# a certain command is triggered. the dj name doesnt need to be your nickname,# so you can also call yourself "goethe mc" even if your irc nickname is# [gay]michael. the good thing about this is: nobody knows your nickname, so # you wont get unwanted querys with wishes and greets. the dj can also change# his nickname and the wish- and greet-feature will still work fine.# only users with the flag +D can be djs, so make sure to give this flag to# your djs -&gt; .chattr djnick +D in the partyline.# # the script also changes the topic when your stream goes on or offline and# sends a public message, which is fully costumizeable. try it out yourself# and maybe it suits your needs :)## it was tested with shoutcast 1.9.2 on debian linux.## NOTE 1: make sure youve got a good connection from your shellserver to your# streamserver - if its the same server then thats very very good. the bot# checks every minute if something happened, so if the connection is not fast# the bot will lag like hell or timeout. make sure to change your settings# for the eggdrop floodprotection.## NOTE 2: read the text here carefully, i get many many emails asking questions# which are acutally answered in this manual here. dont expect me to answer# these mails. :P### script history:# ----------------## v1.03 - different variables in the texts/topics possible#       - possibility to unset the dj#- splitted the scripts chans in 'radiochans' and 'adminchans'#- 'advertiseonlyifonline'-function#- possibility to get a msg if the bot goes down#- more regexes#- some bugfixes # v1.02 - added the .listener command, corrected some typos ;&gt;# v1.01 - fixed a string i forgot to replace# v1.0  - first public release#### what does what config option mean/do?# --------------------------------------## radiochans - the channels the tcl is active in, "" for all, or "#chan1 #chan2"# adminchans - the channels the admin commands work in## streamip - the ip of your radio# streamport - the port of your radio# streampass - the admin pass of your radio## scstatstrigger - the trigger for the radio stats# scplayingtrigger - shows the song the radio is playing now# sclistenertrigger - shows the current listenercount# scdjtrigger - shows the current dj name# scstreamtrigger - shows your stream url -&gt; streamtext# scsetdjtrigger - sets the current dj name, this doesnt have to be your nickname.#                  your nick will be saved too and all wishes and greets will be#                  redirected to this nickname. only availavle for ppl with the +D#                  flag.# scunsetdjtrigger - unsets the current dj, needs the +D flag# scwishtrigger - the command which the users can use if they wish a certain song# scgreettrigger - the command which users can use if the want to greet sb# sclastsongstrigger - the commands which users can use if they want to see the#                      songhistory# schelptrigger - shows the available commands## alertadmin - the userhandle of the user who will get a msg if the server goes down# doalertadmin - 1 if you want to get a msg if the server goes offline, 0 if you# dont. this is done through the bots notes system because its# more comfortable and persistent this way.## announce - shall the bot announce any stuff? 1 for yes, 0 for no# urltopic - shall the bot change the topic everytime the radio goes on or off?# tellsongs - shall the bot post the songtitle to the channels everytime a#             new song starts?# tellusers - shall the bot post the number of current users to the channel#             everytime it changes or a new user maximum is reached?# tellbitrate - shall the bot announce bitrate changes?## offlinetext - the reason the bot says when the radio goes offline# offlinetopic - the topic which is set when the radio goes offline## onlinetext - the reason the bot says when the radio goes online# onlinetopic - the topic which is set when the radio goes online## streamtext - the text with your stream infos# advertise - shall the bot advertist the advertisetext?# advertiseonlyifonline - 1 if the bot only should advertise the radio if the stream#  is up and running, 0 for all-the-time advertisement# advertisetext - the text the bot will post once every 10 minutes.#### how do i put veriables in the different texts and topics?# ----------------------------------------------------------## the script knows the following variables which can be used in the offlinetext,# offlinetopic, onlinetext, onlinetopic, streamtext and advertisetext:# # /dj/ - the djnickname# /sgenre/ - the servers music genre# /stitle/ - the streamtitle# /surl/ - the servers url# /bitrate/ - the current streaming bitrate# /curlist/ - current listeners# /curhigh/ - current listener peak# /cursong/ - the current song# $streamip - the streams ip# $streamport - the streams port# ### known bugs:# ------------## -numbers in the songhistory are killed, this is a xml sourcecode problem# -öäü are not shown correctly in the songtitles, because xml replaces each#  of them with the same chars, so i cant fix it :( bitnapper told me it#  would work anyway, but i cant confirm it. maybe my shoutcast version sucks.#  the string replacements are included, so if it works youre a lucky guy.### loser of the day:# ------------------## loops aka edema for ripping the whole script, removing all of my copyright# infos and comments and putting his name under it. yeah, thats the open source# spirit...#### config ##########################set radiochans "#chan"set adminchans "#chan"set streamip "ip"set streamport "port"set streampass "passwd"set scstatstrigger ".stats"set scstreamtrigger ".stream"set scplayingtrigger ".playing"set sclistenertrigger ".listener"set scdjtrigger ".dj"set scsetdjtrigger ".setdj"set scunsetdjtrigger ".unsetdj"set scwishtrigger ".wish"set scgreettrigger ".greet"set sclastsongstrigger ".lastsongs"set schelptrigger ".help"set alertadmin ""set doalertadmin "1"set announce "1"set urltopic "1"set ctodjc "1"set tellsongs "1"set tellusers "1"set tellbitrate "1"set advertise "1"set advertiseonlyifonline "1"set offlinetext "going offline now"set offlinetopic "visit our website @ www.domsen.org"set onlinetext "/stitle/ now online @ /surl/ with /bitrate/kbits"set onlinetopic "/dj/@/stitle/ @ /surl/ streaming at /bitrate/kbits"set streamtext "tune in /dj/ @ http://$streamip:$streamport/listen.pls"set advertisetext "stream @ http://$streamip:$streamport/listen.pls - powered by www.domsen.org"# end of config #####################bind pub - $scstatstrigger  pub_scstatbind msg - $scstatstrigger  msg_scstatbind pub - $scplayingtrigger  pub_playingbind msg - $scplayingtrigger  msg_playingbind pub - $scdjtrigger  pub_djbind msg - $scdjtrigger  msg_djbind pub D $scsetdjtrigger  pub_setdjbind msg D $scsetdjtrigger  msg_setdjbind pub D $scunsetdjtrigger  pub_unsetdjbind msg D $scunsetdjtrigger  msg_unsetdjbind pub - $scwishtrigger  pub_wishbind msg - $scwishtrigger  msg_wishbind pub - $scgreettrigger  pub_greetbind msg - $scgreettrigger  msg_greetbind pub - $scstreamtrigger pub_streambind msg - $scstreamtrigger msg_streambind pub - $sclastsongstrigger pub_lastsongsbind msg - $sclastsongstrigger msg_lastsongsbind pub - $sclistenertrigger pub_listenerbind msg - $sclistenertrigger msg_listenerbind pub - $schelptrigger pub_helpbind msg - $schelptrigger msg_helpbind time - "* * * * *" isonlinebind time - "?0 * * * *" advertisebind nick D * djnickchangeset dj ""set surl ""set bitrate ""set stitle ""if {[file exists dj]} {set temp [open "dj" r]set dj [gets $temp]close $temp}proc shrink { calc number string start bl} { return [expr [string first "$string" $bl $start] $calc $number] }proc status { } {global streamip streamport streampassif {[catch {set sock [socket $streamip $streamport] } sockerror]} {putlog "error: $sockerror"return 0 } else {puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"puts $sock "Host: $streamip"puts $sock "Connection: close"puts $sock ""flush $sockwhile {[eof $sock] != 1} {set bl [gets $sock]if { [string first "standalone" $bl] != -1 } {set streamstatus [string range $bl [shrink + 14 "&lt;STREAMSTATUS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMSTATUS&gt;" 0 $bl]]}}close $sock} if { $streamstatus == "1" } { return 1 } else { return 0 }}proc poststuff { mode text } {global radiochans djset curlist "0"set curhigh "0"set surl ""set cursong ""set sgenre ""set bitrate "0"set stitle ""set temp [open "isonline" r]while {[eof $temp] != 1} {set zeile [gets $temp]if {[string first "curlist:" $zeile] != -1 } { set curlist $zeile }if {[string first "curhigh:" $zeile] != -1 } { set curhigh $zeile }if {[string first "cursong:" $zeile] != -1 } { set cursong [lrange $zeile 1 [llength $zeile]]] }if {[string first "sgenre:" $zeile] != -1 } { set sgenre [lrange $zeile 1 [llength $zeile]]}if {[string first "serverurl:" $zeile] != -1 } { set surl [lindex $zeile 1] }if {[string first "bitrate:" $zeile] != -1 } { set bitrate [lindex $zeile 1] }if {[string first "stitle:" $zeile] != -1 } { set stitle [lindex $zeile 1] }}close $tempregsub -all "/stitle/" $text "$stitle" textregsub -all "/curlist/" $text "$curlist" textregsub -all "/curhigh/" $text "$curhigh" textregsub -all "/cursong/" $text "$cursong" textregsub -all "/sgenre/" $text "$sgenre" textregsub -all "/surl/" $text "$surl" textregsub -all "/bitrate/" $text "$bitrate" textregsub -all "/dj/" $text "$dj" textforeach chan [channels] {if {$radiochans == "" } { putserv "$mode $chan :$text" }if {$radiochans != "" } {if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1)} {putserv "$mode $chan :$text"}}}}proc schelp { target } {global scstatstrigger scstreamtrigger scplayingtrigger scdjtrigger sclastsongstrigger scwishtrigger scgreettrigger sclistenertriggerputserv "notice $target :the following commands are available:"putserv "notice $target :$scstatstrigger - $scstreamtrigger - $scplayingtrigger - $scdjtrigger - $sclastsongstrigger - $scwishtrigger - $scgreettrigger - $sclistenertrigger"putserv "notice $target :shoutcast.tcl by domsen &lt;domsen@domsen.org&gt;"}proc pub_help {nick uhost hand chan arg} {global radiochansif {$radiochans == "" } { schelp $nick }if {$radiochans != "" } {if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { schelp $nick}}}proc advertise { nick uhost hand chan arg } {global advertisetext advertise advertiseonlyifonlineif {$advertise == "1" &amp;&amp; $advertiseonlyifonline == "0"} { poststuff privmsg "$advertisetext" }if {$advertise == "1" &amp;&amp; $advertiseonlyifonline == "1" &amp;&amp; [status] == 1} { poststuff privmsg "$advertisetext" }}proc setdj {nickname djnickname } {if {$djnickname == "" } { set djnickname $nickname }global streamip streamport streampass dj putlog "shoutcast: new dj: $djnickname ($nickname)"set temp [open "dj" w+]puts $temp $djnicknameclose $tempset temp [open "djnick" w+]puts $temp $nicknameclose $tempif { [status] == "1" } { poststuff privmsg "$djnickname is now rocking the turntables, enjoy."if { $ctodjc == "1" } {set temp [open "isonline" r]while {[eof $temp] != 1} {set zeile [gets $temp]if {[string first "isonline:" $zeile] != -1 } { set oldisonline $zeile }if {[string first "curlist:" $zeile] != -1 } { set oldcurlist $zeile }if {[string first "curhigh:" $zeile] != -1 } { set oldcurhigh $zeile }if {[string first "cursong:" $zeile] != -1 } { set oldsong $zeile }if {[string first "bitrate:" $zeile] != -1 } { set oldbitrate $zeile }}close $temp}} else {putserv "privmsg $nickname :this has not been announced because the radio is currentlfy offline." }}proc msg_setdj { nick uhost hand arg } { setdj $nick $arg }proc pub_setdj { nick uhost hand chan arg } { global adminchans; if {([lsearch -exact [string tolower $adminchans] [string tolower $chan]] != -1) || ($adminchans == "")} { setdj $nick $arg }}proc unsetdj { nick } {global djset dj ""file delete djputserv "notice $nick :dj deleted"}proc msg_unsetdj { nick uhost hand arg } { unsetdj $nick }proc pub_unsetdj { nick uhost hand chan arg } { global adminchans; if {([lsearch -exact [string tolower $adminchans] [string tolower $chan]] != -1) || ($adminchans == "")} { unsetdj $nick }}proc listener { target } {global streamip streamport streampassputlog "shoutcast: $target requested listener count"if {[catch {set sock [socket $streamip $streamport] } sockerror]} {putlog "error: $sockerror"return 0 } else {puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"puts $sock "Host: $streamip"puts $sock "Connection: close"puts $sock ""flush $sockwhile {[eof $sock] != 1} {set bl [gets $sock]if { [string first "standalone" $bl] != -1 } {set repl [string range $bl [shrink + 19 "&lt;REPORTEDLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/REPORTEDLISTENERS&gt;" 0 $bl]]set curhigh [string range $bl [shrink + 15 "&lt;PEAKLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/PEAKLISTENERS&gt;" 0 $bl]]set maxl [string range $bl [shrink + 14 "&lt;MAXLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/MAXLISTENERS&gt;" 0 $bl]]set avgtime [string range $bl [shrink + 13 "&lt;AVERAGETIME&gt;" 0 $bl] [shrink - 1 "&lt;/AVERAGETIME&gt;" 0 $bl]]}}close $sockputserv "notice $target :there are currently $repl unique people listening, the listener maximum is $maxl, our user peak was at $curhigh listeners, the listening time average is $avgtime"}}proc msg_listener { nick uhost hand arg } { listener $nick }proc pub_listener { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { listener $nick  }}proc wish { nick arg } {if {$arg == ""} { putserv "notice $nick :you forgot to add your wish"; return 0}if { [status] == "1" } { set temp [open "djnick" r]set djnick [gets $temp]close $tempputserv "privmsg $djnick :(WISH) - $nick - $arg"} else {putserv "notice $nick :sorry radio is currently offline" }}proc msg_wish { nick uhost hand arg } { wish $nick $arg }proc pub_wish { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { wish $nick $arg }}proc sclastsongs { target } {global streamip streamport streampassputlog "shoutcast: $target requested songhistory"if {[catch {set sock [socket $streamip $streamport] } sockerror]} {putlog "error: $sockerror"return 0 } else {puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"puts $sock "Host: $streamip"puts $sock "Connection: close"puts $sock ""flush $sockwhile {[eof $sock] != 1} {set bl [gets $sock]if { [string first "standalone" $bl] != -1 } {set songs [string range $bl [string first "&lt;TITLE&gt;" $bl] [expr [string last "&lt;/TITLE&gt;" $bl] + 7]]regsub -all "&lt;" $songs "&lt;" songsregsub -all "&gt;" $songs "&gt;" songsregsub -all "&amp;" $songs "+" songsregsub -all """ $songs "\"" songsregsub -all "'" $songs "'" songsregsub -all "ÿ" $songs "" songsregsub -all "&lt;TITLE&gt;" $songs "(" songsregsub -all "&lt;/TITLE&gt;" $songs ")" songsregsub -all "&lt;SONG&gt;" $songs "" songsregsub -all "&lt;/SONG&gt;" $songs " - " songsregsub -all "&lt;PLAYEDAT&gt;" $songs "" songsregsub -all "&lt;/PLAYEDAT&gt;" $songs "" songsregsub -all {\d} $songs "" songsregsub -all "´" $songs "´" songsregsub -all "&amp;#x96;" $songs "-" songsregsub -all "ö" $songs "ö" songsregsub -all "ä" $songs "ä" songsregsub -all "ü" $songs "ü" songsregsub -all "Ö" $songs "Ö" songsregsub -all "Ä" $songs "Ä" songsregsub -all "Ü" $songs "Ü" songsregsub -all "ß" $songs "ß" songs}}close $sockputserv "notice $target :$songs"}}proc msg_lastsongs { nick uhost hand arg } { sclastsongs $nick }proc pub_lastsongs { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { sclastsongs $nick }}proc scstream { target } {global streamip streamport streamtextputlog "shoutcast: streaminfo requested by $target"putserv "notice $target :$streamtext"}proc msg_stream { nick uhost hand arg } { scstream $nick }proc pub_stream { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstream $nick }}proc scgreet { nick arg } {if {$arg == ""} { putserv "notice $nick :you forgot to add your greetmessage"; return 0}if { [status] == "1" } { set temp [open "djnick" r]set djnick [gets $temp]close $tempputserv "privmsg $djnick :(GREET) - $nick - $arg"} else {putserv "notice $nick :sorry radio is currently offline" }}proc msg_greet { nick uhost hand arg } { scgreet $nick $arg }proc pub_greet { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scgreet $nick $arg }}proc djnickchange { oldnick uhost hand chan newnick } {set temp [open "djnick" r]set djnick [gets $temp]close $tempif {$oldnick == $djnick} {putlog "shoutcast: dj nickchange $oldnick -&gt; $newnick"set temp [open "djnick" w+]puts $temp $newnickclose $temp}}proc dj { target } {global streamip streamport streampass djputlog "shoutcast: $target asked for dj info" if {[status] == 1} {if {[file exists dj]} {set temp [open "dj" r]set dj [gets $temp]close $tempputserv "notice $target :$dj is at the turntables!"} else { putserv "notice $target :sorry, no dj name available" }} else { putserv "notice $target :sorry radio is currently offline" }}proc msg_dj { nick uhost hand arg } { dj $nick"}proc pub_dj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { dj $nick  }}proc scstat {target} {global streamip streamport streampassputlog "shoutcast: $target asked for serverstats"if {[catch {set sock [socket $streamip $streamport] } sockerror]} {putlog "error: $sockerror"return 0 } else {puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"puts $sock "Host: $streamip"puts $sock "Connection: close"puts $sock ""flush $sockwhile {[eof $sock] != 1} {set bl [gets $sock]if { [string first "standalone" $bl] != -1 } {set streamstatus [string range $bl [shrink + 14 "&lt;STREAMSTATUS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMSTATUS&gt;" 0 $bl]]set repl [string range $bl [shrink + 19 "&lt;REPORTEDLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/REPORTEDLISTENERS&gt;" 0 $bl]]set curhigh [string range $bl [shrink + 15 "&lt;PEAKLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/PEAKLISTENERS&gt;" 0 $bl]]set currentl [string range $bl [shrink + 18 "&lt;CURRENTLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/CURRENTLISTENERS&gt;" 0 $bl]]set surl [string range $bl [shrink + 11 "&lt;SERVERURL&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERURL&gt;" 0 $bl]]set maxl [string range $bl [shrink + 14 "&lt;MAXLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/MAXLISTENERS&gt;" 0 $bl]]set bitrate [string range $bl [shrink + 9 "&lt;BITRATE&gt;" 0 $bl] [shrink - 1 "&lt;/BITRATE&gt;" 0 $bl]]set stitle [string range $bl [shrink + 13 "&lt;SERVERTITLE&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERTITLE&gt;" 0 $bl]]set sgenre [string range $bl [shrink + 13 "&lt;SERVERGENRE&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERGENRE&gt;" 0 $bl]]if {$sgenre != ""} {set sgenre " ($sgenre)"}set avgtime [string range $bl [shrink + 13 "&lt;AVERAGETIME&gt;" 0 $bl] [shrink - 1 "&lt;/AVERAGETIME&gt;" 0 $bl]]set irc [string range $bl [shrink + 5 "&lt;IRC&gt;" 0 $bl] [shrink - 1 "&lt;/IRC&gt;" 0 $bl]]set icq [string range $bl [shrink + 5 "&lt;ICQ&gt;" 0 $bl] [shrink - 1 "&lt;/ICQ&gt;" 0 $bl]]if {$icq == 0} { set icq "N/A" }set aim [string range $bl [shrink + 5 "&lt;AIM&gt;" 0 $bl] [shrink - 1 "&lt;/AIM&gt;" 0 $bl]]set webhits [string range $bl [shrink + 9 "&lt;WEBHITS&gt;" 0 $bl] [shrink - 1 "&lt;/WEBHITS&gt;" 0 $bl]]set streamhits [string range $bl [shrink + 12 "&lt;STREAMHITS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMHITS&gt;" 0 $bl]]set version [string range $bl [shrink + 9 "&lt;VERSION&gt;" 0 $bl] [shrink - 1 "&lt;/VERSION&gt;" 0 $bl]]if {$streamstatus == 1} {if {[file exists dj]} {set temp [open "dj" r]set dj [gets $temp]close $temp} else { set dj "none" }putserv "notice $target :$stitle$sgenre is online, running shoutcast $version and streaming at $bitrate kbps,  your dj is $dj. please visit $surl"} else {putserv "notice $target :$stitle$sgenre is currenty offline, running shoutcast $version and streaming at $bitrate kbps, check out $surl" }putserv "notice $target :there are currently $repl unique people listening, the listener maximum is $maxl, our user peak was at $curhigh listeners."putserv "notice $target :the average user is listening $avgtime seconds, our stream had $webhits webhits and $streamhits streamhits."putserv "notice $target :you can contact the team by irc on $irc, via aim at $aim and with icq by the uin $icq."}}close $sock}}proc msg_scstat { nick uhost hand arg } { scstat $nick}proc pub_scstat { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { scstat $nick  }}proc playing {target} {global streamip streamport streampass djputlog "shoutcast: $target asked for current song"if {[catch {set sock [socket $streamip $streamport] } sockerror]} {putlog "error: $sockerror"return 0 } else {puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"puts $sock "Host: $streamip"puts $sock "Connection: close"puts $sock ""flush $sockwhile {[eof $sock] != 1} {set bl [gets $sock]if { [string first "standalone" $bl] != -1 } {set streamstatus [string range $bl [shrink + 14 "&lt;STREAMSTATUS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMSTATUS&gt;" 0 $bl]]set songtitle [string range $bl [shrink + 11 "&lt;SONGTITLE" 0 $bl] [shrink - 1 "&lt;/SONGTITLE&gt;" 0 $bl]]set songurl [string range $bl [shrink + 9 "&lt;SONGURL&gt;" 0 $bl] [shrink - 1 "&lt;/SONGURL&gt;" 0 $bl]]if {$songurl != ""} { set songurl " ($songurl)"}regsub -all "&lt;" $songtitle "&lt;" songtitleregsub -all "&gt;" $songtitle "&gt;" songtitleregsub -all "&amp;" $songtitle "+" songtitle  regsub -all """ $songtitle "\"" songtitleregsub -all "'" $songtitle "'" songtitleregsub -all "ÿ" $songtitle "" songtitleregsub -all "´" $songtitle "´" songtitleregsub -all "&amp;#x96;" $songtitle "-" songtitleregsub -all "ö" $songtitle "ö" songtitleregsub -all "ä" $songtitle "ä" songtitleregsub -all "ü" $songtitle "ü" songtitleregsub -all "Ö" $songtitle "Ö" songtitleregsub -all "Ä" $songtitle "Ä" songtitleregsub -all "Ü" $songtitle "Ü" songtitleregsub -all "ß" $songtitle "ß" songtitleif {$streamstatus == 1} {putserv "notice $target :now playing $songtitle$songurl"} else {putserv "notice $target :server is currently offline, sorry"}}}close $sock}}proc msg_playing { nick uhost hand arg } { playing $nick}proc pub_playing { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { playing $nick  }}proc isonline { nick uhost hand chan arg } {global radiochans announce tellusers tellsongs tellbitrate urltopic djglobal offlinetext offlinetopic onlinetext onlinetopicglobal streamip streampass streamport djglobal doalertadmin alertadminif {$announce == 1 || $tellsongs == 1 || $tellusers == 1 || $tellbitrate == 1} {set isonlinefile "isonline"set oldisonline "isonline: 0"set oldcurlist "curlist: 0"set oldcurhigh "curhigh: 0"set oldsong "cursong: 0"set oldbitrate "bitrate: 0"if {[file exists $isonlinefile]} {putlog "shoutcast: checking if stream is online"set temp [open "isonline" r]while {[eof $temp] != 1} {set zeile [gets $temp]if {[string first "isonline:" $zeile] != -1 } { set oldisonline $zeile }if {[string first "curlist:" $zeile] != -1 } { set oldcurlist $zeile }if {[string first "curhigh:" $zeile] != -1 } { set oldcurhigh $zeile }if {[string first "cursong:" $zeile] != -1 } { set oldsong $zeile }if {[string first "bitrate:" $zeile] != -1 } { set oldbitrate $zeile }}close $temp}if {[catch {set sock [socket $streamip $streamport] } sockerror]} {putlog "error: $sockerror"return 0} else {puts $sock "GET /admin.cgi?pass=$streampass&amp;mode=viewxml&amp;page=0 HTTP/1.0"puts $sock "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9)"puts $sock "Host: $streamip"puts $sock "Connection: close"puts $sock ""flush $sockwhile {[eof $sock] != 1} {set bl [gets $sock]if { [string first "standalone" $bl] != -1 } {set streamstatus "isonline: [string range $bl [shrink + 14 "&lt;STREAMSTATUS&gt;" 0 $bl] [shrink - 1 "&lt;/STREAMSTATUS&gt;" 0 $bl]]"set repl "curlist: [string range $bl [shrink + 19 "&lt;REPORTEDLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/REPORTEDLISTENERS&gt;" 0 $bl]]"set curhigh "curhigh: [string range $bl [shrink + 15 "&lt;PEAKLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/PEAKLISTENERS&gt;" 0 $bl]]"set currentl [string range $bl [shrink + 18 "&lt;CURRENTLISTENERS&gt;" 0 $bl] [shrink - 1 "&lt;/CURRENTLISTENERS&gt;" 0 $bl]]set surl "serverurl: [string range $bl [shrink + 11 "&lt;SERVERURL&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERURL&gt;" 0 $bl]]"set cursong "cursong: [string range $bl [shrink + 11 "&lt;SONGTITLE" 0 $bl] [shrink - 1 "&lt;/SONGTITLE&gt;" 0 $bl]]"set songurl [string range $bl [shrink + 9 "&lt;SONGURL&gt;" 0 $bl] [shrink - 1 "&lt;/SONGURL&gt;" 0 $bl]]set bitrate "bitrate: [string range $bl [shrink + 9 "&lt;BITRATE&gt;" 0 $bl] [shrink - 1 "&lt;/BITRATE&gt;" 0 $bl]]"set stitle "stitle: [string range $bl [shrink + 13 "&lt;SERVERTITLE&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERTITLE&gt;" 0 $bl]]"set sgenre "sgenre: [string range $bl [shrink + 13 "&lt;SERVERGENRE&gt;" 0 $bl] [shrink - 1 "&lt;/SERVERGENRE&gt;" 0 $bl]]"}}close $sock}set temp [open "isonline" w+]puts $temp "$streamstatus\n$repl\n$curhigh\n$cursong\n$bitrate\n$stitle\n$sgenre\n$surl"close $tempif {$announce == 1 } {if {$streamstatus == "isonline: 0" &amp;&amp; $oldisonline == "isonline: 1"} {poststuff privmsg $offlinetextif {$doalertadmin == "1"} { sendnote domsen $alertadmin "radio is now offline" }if {$urltopic == 1} { poststuff topic $offlinetopic }}if {$streamstatus == "isonline: 1" &amp;&amp; $oldisonline == "isonline: 0" } {if {$sgenre != ""} {set sgenre " ([lrange $sgenre 1 [llength $sgenre]] )"}poststuff privmsg "$onlinetext"if {$urltopic == 1} { poststuff topic "$onlinetopic" }}}if {($tellusers == 1) &amp;&amp; ($streamstatus == "isonline: 1") &amp;&amp; ($oldcurhigh != "curhigh: 0") } {if {$oldcurhigh != $curhigh} {poststuff privmsg "new listener peak: [lindex $curhigh 1]"}if {$oldcurlist != $repl} {poststuff privmsg "there are currently [lindex $repl 1] ($currentl) people listening"}}if {($tellsongs == 1) &amp;&amp; ($oldsong != $cursong) &amp;&amp; ($streamstatus == "isonline: 1") } {if {$songurl != ""} { set songurl " ($songurl)"}regsub -all "&lt;" $cursong "&lt;" cursongregsub -all "&gt;" $cursong "&gt;" cursongregsub -all "&amp;" $cursong "+" cursong  regsub -all """ $cursong "\"" cursongregsub -all "'" $cursong "'" cursongregsub -all "ÿ" $cursong "" cursongregsub -all "´" $cursong "´" cursongregsub -all "&amp;#x96;" $cursong "-" cursongregsub -all "ö" $cursong "ö" cursongregsub -all "ä" $cursong "ä" cursongregsub -all "ü" $cursong "ü" cursongregsub -all "Ö" $cursong "Ö" cursongregsub -all "Ä" $cursong "Ä" cursongregsub -all "Ü" $cursong "Ü" cursongregsub -all "ß" $cursong "ß" cursongputlog $cursongpoststuff privmsg "now playing: [lrange $cursong 1 [llength $cursong]]$songurl"}if {($tellbitrate == 1) &amp;&amp; ($oldbitrate != $bitrate) &amp;&amp; ($streamstatus == "isonline: 1") &amp;&amp; ($oldbitrate != "bitrate: 0")} {poststuff privmsg "bitrate switched to [lindex $bitrate 1]kbps"}}}putlog "*** shoutcast.tcl v1.03 by domsen &lt;domsen@domsen.org&gt; succesfully loaded. turn it up baby."</code></pre></div>Ps: Note i have gone through the various post on egghelp regarding this matter without finding any solution. I have installed all different versions of eggdrop from 18,19,20,21 just to rule out any version error but matter persist.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10110">gamble27</a> — Thu Mar 28, 2013 12:28 am</p><hr />
]]></content>
	</entry>
	</feed>
