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

	<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>2002-10-07T07:36:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-07T07:36:39-04:00</updated>

		<published>2002-10-07T07:36:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11766#p11766</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11766#p11766"/>
		<title type="html"><![CDATA[timer help..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11766#p11766"><![CDATA[
It apears that you are using the timer command incorrect.<br><br>Tcl has a special meaning for commands within [] brackets.<br><br>A lot of commands, return data, and as suhc, this data needs some method or another, of being stored, or used in another command. THe goal of the [] brackets, it to allow this data return to take place.<br><br>Anything between [ and ] is called as a command, and is then replaced with the return value, on the fly (meaning, if the return value is different each time, so will the value being replaced).<br><br>Thus, if using<br><div class="codebox"><p>Code: </p><pre><code>proc mycommand {} {  return this}timer 180 [mycommand]</code></pre></div>This is saying, run the code between the [], and replace it with the returned value. Thus, the command becomes<div class="codebox"><p>Code: </p><pre><code>timer 180 this</code></pre></div>Thus, the [mycommand] is replaced instantly, and the command "this" is executed after 180 mins.<br><br>In your case, this is obviously wrong.<br><br>You should infact be using a plain old<div class="codebox"><p>Code: </p><pre><code>timer 180 mycommand</code></pre></div>This would run the command "mycommand" after 180 mins.<br><br>Applying this to your script, in reality, you simply change the command so that the []'s are removed.<br><br>However, this does not solve your problems 100%.<br><br>You state that ".tcl timer 180 [blah]" didn't work. In that case, there is a problem witht he rest of your script anyway. Seeing as the []'s mean your script is run right away, it should have done a database update.<br><br>If it hasn't, then this neads looking intop itself.<br><br>Beyond that, once a timer has run it's course, it dies. IE, it's one off thing. And you will need to a create a newone, after it has completed it's cycle of 180 mins.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Oct 07, 2002 7:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[slashem]]></name></author>
		<updated>2002-10-07T06:14:09-04:00</updated>

		<published>2002-10-07T06:14:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11765#p11765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11765#p11765"/>
		<title type="html"><![CDATA[timer help..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11765#p11765"><![CDATA[
I made a procedure that I wanna execute every 3 hours..<br>proc timecheck { } { <br>...<br>some code<br>..<br>}<br><br>it checks a database for something and msg's something to a nickname if it's found..<br><br>I wanna do this procedure every 3 hours so do I just add:<br>timer 180 [timecheck] in the eggdrop.conf ?<br><br>I tried .tcl timer 2 [timecheck]  in the partyline to see if it does something but nothing appeared to work..   it did start a timer however and now I don't know how to stop it or how to view the timers that are running..<br><br>would really appreciate some help on this.. thx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1742">slashem</a> — Mon Oct 07, 2002 6:14 am</p><hr />
]]></content>
	</entry>
	</feed>
