<?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/6197" />

	<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>2003-11-23T18:10:54-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-11-23T18:10:54-04:00</updated>

		<published>2003-11-23T18:10:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30587#p30587</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30587#p30587"/>
		<title type="html"><![CDATA[shoutcast tcl, need a help pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30587#p30587"><![CDATA[
Your welcome.<br><br>Just for info: <strong class="text-strong">||</strong> means or, where <strong class="text-strong">&amp;&amp;</strong> means and.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Nov 23, 2003 6:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-23T11:23:38-04:00</updated>

		<published>2003-11-23T11:23:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30570#p30570</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30570#p30570"/>
		<title type="html"><![CDATA[shoutcast tcl, need a help pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30570#p30570"><![CDATA[
Thx m8, it works fine!!!!<p>Statistics: Posted by Guest — Sun Nov 23, 2003 11:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-23T11:16:14-04:00</updated>

		<published>2003-11-23T11:16:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30569#p30569</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30569#p30569"/>
		<title type="html"><![CDATA[shoutcast tcl, need a help pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30569#p30569"><![CDATA[
the || i must change to &amp;&amp; ?<p>Statistics: Posted by Guest — Sun Nov 23, 2003 11:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-11-23T11:08:23-04:00</updated>

		<published>2003-11-23T11:08:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30568#p30568</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30568#p30568"/>
		<title type="html"><![CDATA[shoutcast tcl, need a help pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30568#p30568"><![CDATA[
change<div class="codebox"><p>Code: </p><pre><code>bind pub D $scsetdjtrigger  pub_setdj bind msg D $scsetdjtrigger  msg_setdj</code></pre></div> to<div class="codebox"><p>Code: </p><pre><code>bind pub - $scsetdjtrigger  pub_setdj bind msg - $scsetdjtrigger  msg_setdj</code></pre></div>and change the procs <strong class="text-strong">pub_setdj</strong> and <strong class="text-strong">msg_setdj</strong> to<div class="codebox"><p>Code: </p><pre><code>proc pub_setdj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { if {[isop $nick $chan] || [isvoice $nick $chan]} { setdj $nick $arg } } }</code></pre></div>and <div class="codebox"><p>Code: </p><pre><code>proc msg_setdj { nick uhost hand arg } { global radiochans; foreach chan [channels] { if {[isop $nick $chan] || [isvoice $nick $chan]} { setdj $nick $arg } } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Nov 23, 2003 11:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2003-11-23T10:45:08-04:00</updated>

		<published>2003-11-23T10:45:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30566#p30566</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30566#p30566"/>
		<title type="html"><![CDATA[shoutcast tcl, need a help pls]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30566#p30566"><![CDATA[
we use in our radio the shoutcast tcl, ist works fine... but only +D user of the bot can use !setdj. i need help to configure the script that alle voiced and opped user in the chan !setdj write an the bot the !wish and !greet sent to the dj how write !setdj...sry for my english <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>here is the script: <br><div class="codebox"><p>Code: </p><pre><code># what does what config option mean?## radiochans - the channels the tcl is active in, "" for all, or "#chan1 #chan2"# 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.# 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## 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?# advertisetext - the text the bot will post once every 10 minutes.## 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 :(#### config ##########################set radiochans "#tuned"set streamip "213.158.118.69"set streamport "xxxx"set streampass "xxxxxxxxxxxx"set scstatstrigger "!status"set scstreamtrigger "!stream"set scplayingtrigger "!playing"set sclistenertrigger "!listener"set scdjtrigger "!dj"set scsetdjtrigger "!setdj"set scwishtrigger "!wunsch"set scgreettrigger "!gruss"set sclastsongstrigger "!lastsongs"set schelptrigger "!help"set announce "1"set urltopic "1"set tellsongs "1"set tellusers "1"set tellbitrate "1"set advertise "1"set offlinetext "2,0::: Radio ist zur Zeit offline :::"set offlinetopic "2,0::: Radio ist zur Zeit offline :::"set onlinetext ""set onlinetopic "2,0::: Radio wieder online ::: http://$streamip:$streamport/listen.pls :::"set streamtext "2,0::: los zuhörn :-) @ http://$streamip:$streamport/listen.pls :::"set advertisetext "2,0::: Radio @ http://$streamip:$streamport/listen.pls :::"# 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 - $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 * djnickchangeproc putchan {chan msg} { putserv "PRIVMSG $chan :$msg" }proc shrink { calc number string start bl} { return [expr [string first "$string" $bl $start] $calc $number] }proc poststuff { mode text } {global radiochansforeach chan [channels] {if {$radiochans == "" } { putserv "$mode $chan :$text" }if {$radiochans != "" } {if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} {putserv "$mode $chan :$text"}}}}proc schelp { target } {global scstatstrigger scstreamtrigger scplayingtrigger scdjtrigger sclastsongstrigger scwishtrigger scgreettrigger sclistenertrigger chan botnickputchan $chan "2,0::: the following commands are available :::"putchan $chan "2,0::: $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 advertiseif {$advertise == "1" } { poststuff privmsg $advertisetext }}proc setdj {nickname djnickname } {if {$djnickname == "" } { set djnickname $nickname }global streamip streamport streampass chan botnickputlog "shoutcast: new dj: $djnickname ($nickname)"set temp [open "dj" w+]puts $temp $djnicknameclose $tempset temp [open "djnick" w+]puts $temp $nicknameclose $tempputserv "privmsg $nickname :your are now dj of this radio"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]]}}if { $streamstatus == "1" } { poststuff privmsg "2,0::: $djnickname rockt jetzt für euch das Haus. :::" } else {putchan $chan "2,0::: Radio ist zur Zeit offline. :::" }}}proc listener { target } {global streamip streamport streampass chan botnickputlog "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 $sockputchan $chan "2,0::: es hören gerade $repl Leute zu. Maximal können $maxl Leute zuhören. Peak liegt bei $curhigh Zuhörern. :::"}}proc msg_listener { nick uhost hand arg } { global radiochans; 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 :na haste da net was vergessen?? :-)"; return 0}global streamip streamport streampass chan botnickputlog "shoutcast: $nick wants to hear: $arg"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]]}}if { $streamstatus == "1" } { set temp [open "djnick" r]set djnick [gets $temp]close $tempputserv "privmsg $djnick :(WUNSCH) - $nick - $arg"putserv "notice $nick :Dein Wunsch wurde weitergeleitet. Denk daran !!!einmal!!! reicht."} else {putchan $chan "2,0::: sorry radio is currently offline :::" }}}proc msg_wish { nick uhost hand arg } { global radiochans; 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 "" songs}}putserv "notice $target :$songs"}}proc msg_lastsongs { nick uhost hand arg } { global radiochans; 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 chan botnickputlog "shoutcast: streaminfo requested by $target"putchan $chan "$streamtext"}proc msg_stream { nick uhost hand arg } { global radiochans; 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 :einen Gruss solltest schon schreiben. :-)"; return 0}global dj streamip streamport streampass chan botnickputlog "shoutcast: $nick greets fly out to: $arg"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]]}}if { $streamstatus == "1" } { set temp [open "djnick" r]set djnick [gets $temp]close $tempputserv "privmsg $djnick :(GRUSS) - $nick - $arg"putserv "notice $nick :Dein Gruss wurde weitergeleitet. Denk daran !!!einmal!!! reicht."} else {putchan $chan "2,0::: sorry radio is currently offline :::" }}}proc msg_greet { nick uhost hand arg } { global radiochans; 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 msg_setdj { nick uhost hand arg } { global radiochans; setdj $nick $arg }proc pub_setdj { nick uhost hand chan arg } { global radiochans; if {([lsearch -exact [string tolower $radiochans] [string tolower $chan]] != -1) || ($radiochans == "")} { setdj $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 chan botnickputlog "shoutcast: $target asked for dj info" 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]]}}if {$streamstatus == 1} {if {[file exists dj]} {set temp [open "dj" r]set dj [gets $temp]close $tempputchan $chan "2,0::: $dj rockt für euch das Haus! :::"} else { putchan $chan "2,0::: sorry, no dj name available :::" }} else {putchan $chan "2,0::: sorry radio is currently offline :::"}close $sock}}proc msg_dj { nick uhost hand arg } { global radiochans; 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 chan botnickputlog "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" }putchan $chan "2,0::: $stitle$sgenre ist online.$dj ist euer DJ. :::"} else {putchan $chan "2,0::: $stitle$sgenre is currenty offline, streaming at $bitrate kbps. :::" }putchan $chan "2,0::: wir haben $repl / $maxl listener der peak liegt bei $curhigh. :::"#putchan $chan "2,0::: #myrave )) Wer techno mag, wird #myrave lieben (( :::"#putchan $chan "2,0::: #funfunfun )) fun garantiert (( :::"#putchan $chan "2,0::: #amokxx )) cs-clan im aufschwung (( :::"}}close $sock}}proc msg_scstat { nick uhost hand arg } { global radiochans; 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 chan botnickputlog "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 "" songtitleif {$streamstatus == 1} {putchan $chan "2,0::: now playing $songtitle :::"} else {putchan $chan "2,0::: server is currently offline, sorry :::"}}}close $sock}}proc msg_playing { nick uhost hand arg } { global radiochans; 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 global offlinetext offlinetopic onlinetext onlinetopicglobal streamip streampass streamportif {$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 [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]]}}close $sock}set temp [open "isonline" w+]puts $temp "$streamstatus\n$repl\n$curhigh\n$cursong\n$bitrate"close $tempif {$announce == 1 } {if {$streamstatus == "isonline: 0" &amp;&amp; $oldisonline == "isonline: 1"} {poststuff privmsg $offlinetextif {$urltopic == 1} { poststuff topic $offlinetopic }}if {$streamstatus == "isonline: 1" &amp;&amp; $oldisonline == "isonline: 0" } {if {$sgenre != ""} {set sgenre " ($sgenre)"}# poststuff privmsg "$stitle$sgenre now online @ http://[lindex $surl 1]/listen.pls with [lindex $bitrate 1]kbits $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 "2,0::new listener peak: [lindex $curhigh 1] :::"}if {$oldcurlist != $repl} {poststuff privmsg "2,0::: es hören gerade [lindex $repl 1] ($currentl) Leute zu :::"}}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 "" cursongpoststuff privmsg "2,0::: now playing: [lrange $cursong 1 [llength $cursong]] :::"}if {($tellbitrate == 1) &amp;&amp; ($oldbitrate != $bitrate) &amp;&amp; ($streamstatus == "isonline: 1") &amp;&amp; ($oldbitrate != "bitrate: 0")} {poststuff privmsg "2,0::: Bitrate hat gewechselt auf [lindex $bitrate 1]kbps :::"}}}putlog "*** shoutcast.tcl v1.02 by domsen &lt;domsen@domsen.org&gt; succesfully loaded. turn it up baby."</code></pre></div><p>Statistics: Posted by Guest — Sun Nov 23, 2003 10:45 am</p><hr />
]]></content>
	</entry>
	</feed>
