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

	<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>2010-01-16T12:08:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2010-01-16T12:08:07-04:00</updated>

		<published>2010-01-16T12:08:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91699#p91699</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91699#p91699"/>
		<title type="html"><![CDATA[Help with timer script - chan var [RESOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91699#p91699"><![CDATA[
thank you for pointing that out to me <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=7220">cache</a> — Sat Jan 16, 2010 12:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-01-16T08:28:04-04:00</updated>

		<published>2010-01-16T08:28:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91696#p91696</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91696#p91696"/>
		<title type="html"><![CDATA[Help with timer script - chan var [RESOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91696#p91696"><![CDATA[
From where should we get the value for $chan?<br><br>If you're thinking of the "streamch" variable you set in the beginning of the script, why not just use that one?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Jan 16, 2010 8:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2010-01-16T12:08:35-04:00</updated>

		<published>2010-01-15T22:54:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91692#p91692</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91692#p91692"/>
		<title type="html"><![CDATA[Help with timer script - chan var [RESOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91692#p91692"><![CDATA[
I am trying to make this run by a timer<div class="codebox"><p>Code: </p><pre><code># Public/User Channelset streamch "#public"# Private/DJ Channelset djch "#private"set radiotime 5package require httpset a "$botnick"set a [string tolower "$nick"]if {![info exists ald]} {set ald 1timer $radiotime get_shoutcast_song}proc get_shoutcast_song {} {   global url streamch a radiotime   set streamch [string tolower $streamch]   ::http::config -useragent "Mozilla/5.0; Shoutinfo"   if {[string tolower $chan] == "$streamch"} {    set http_req [::http::geturl $url -timeout 2000]if {[::http::status $http_req] != "ok"} {puthelp "PRIVMSG $chan :Stream is unavailable";}set data [::http::data $http_req]::http::cleanup $http_reqif {[regexp {&lt;font class=default&gt;Current Song: &lt;/font&gt;&lt;/td&gt;&lt;td&gt;&lt;font class=default&gt;&lt;b&gt;([^&lt;]+)&lt;/b&gt;} $data x title]} {puthelp "PRIVMSG $chan :\002Current Song\002: $title"timer $radiotime get_shoutcast_song} else {puthelp "PRIVMSG $chan :Couldn't receive any information, checking server status..."get_shoutcast_server $nick $uhost $hand $chan $arg}   }}</code></pre></div>Error I get is:<br>[21:44] Tcl error in script for 'timer7716':<br>[21:44] can't read "chan": no such variable<br><br>Can someone please help me get the $chan variable added? I tried global chan with no luck.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Fri Jan 15, 2010 10:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
