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

	<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>2007-12-12T14:02:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-12-12T14:02:15-04:00</updated>

		<published>2007-12-12T14:02:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79281#p79281</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79281#p79281"/>
		<title type="html"><![CDATA[TCL error : Invalid timer ID]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79281#p79281"><![CDATA[
1st: Don't mix timer and utimer..<br><br>2nd: "info exists timer" only checks wether the variable named "timer" exists or not. It does no check whatsoever wether the name within "timer" actually points to a valid timer or utimer.<br>As for the post made by "user", it depends on the proc preceding the example you posted, and expects the globalspace variable "timer" to hold the name of a speciffic timer. It also assumes that the code triggered by the timer will unset that very same variable.<br><br>3rd: In order to check wether a (u)timer actually exists, search the list generated by "timers" (or "utimers") for the existance of the actual timer. The link posted by Alchera illustrates how this is done.<br><br>4th: When creating a (u)timer, do it something like this:<div class="codebox"><p>Code: </p><pre><code>utimer 4 [list array unset g_linesperhost *$l_uhost*$l_chan*]</code></pre></div>This way you don't have to worry about "special" characters and such. In case you wish to keep track of the timer-id, do something like this:<div class="codebox"><p>Code: </p><pre><code>set myvar [utimer 4 [list array unset g_linesperhost *$l_uhost*$l_chan*]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Dec 12, 2007 2:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2007-12-12T08:03:24-04:00</updated>

		<published>2007-12-12T08:03:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79280#p79280</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79280#p79280"/>
		<title type="html"><![CDATA[TCL error : Invalid timer ID]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79280#p79280"><![CDATA[
Yep I read this post.<br>But I also read in another post: <a href="http://forum.egghelp.org/viewtopic.php?p=74519" class="postlink">http://forum.egghelp.org/viewtopic.php?p=74519</a> that you can use the [info exists timer] to directly determine if a timer is already running.<br><br>Code by "user".<div class="codebox"><p>Code: </p><pre><code>   if {[info exists timer]} {       killutimer $timer       unset timer    } </code></pre></div>Besides, Sir_Fz explains how to kill a timer when you know the proc it is linked to.<br>What if my timer is linked to something else like:<div class="codebox"><p>Code: </p><pre><code>set g_timerz(timer:$l_uhost:$l_chan) [utimer 4 "array unset g_linesperhost *$l_uhost*$l_chan*"]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Wed Dec 12, 2007 8:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2007-12-12T07:48:14-04:00</updated>

		<published>2007-12-12T07:48:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79279#p79279</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79279#p79279"/>
		<title type="html"><![CDATA[TCL error : Invalid timer ID]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79279#p79279"><![CDATA[
A simple <a href="http://forum.egghelp.org/search.php" class="postlink">Search</a> would have saved a post.<br><br><a href="http://forum.egghelp.org/viewtopic.php?t=9941" class="postlink">Timers (Searching, killing, using time binds)</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Wed Dec 12, 2007 7:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[z_one]]></name></author>
		<updated>2007-12-12T07:09:52-04:00</updated>

		<published>2007-12-12T07:09:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=79278#p79278</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=79278#p79278"/>
		<title type="html"><![CDATA[TCL error : Invalid timer ID]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=79278#p79278"><![CDATA[
I got the following procedure that kills a given utimer.<br><div class="codebox"><p>Code: </p><pre><code>proc killthetimer {global g_timerz  if {[info exists g_timerz(timer:$l_uhost:$l_chan)]} {    putlog "timer ID: $g_timerz(timer:$l_uhost:$l_chan)"    killutimer $g_timerz(timer:$l_uhost:$l_chan)    putlog "killed the timer"  }} </code></pre></div><br>When I run it I get the output <strong class="text-strong"><em class="text-italics">timer ID: timer13424</em></strong> then immediately after it I get <strong class="text-strong">TCL error: Invalid timer ID</strong>.<br>What's going on ? How can it not kill the utimer if its ID was correctly found ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=698">z_one</a> — Wed Dec 12, 2007 7:09 am</p><hr />
]]></content>
	</entry>
	</feed>
