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

	<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>2004-08-28T02:40:14-04:00</updated>

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

		<entry>
		<author><name><![CDATA[exs-n0s]]></name></author>
		<updated>2004-08-28T02:40:14-04:00</updated>

		<published>2004-08-28T02:40:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40292#p40292</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40292#p40292"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40292#p40292"><![CDATA[
<blockquote class="uncited"><div>This should work<div class="codebox"><p>Code: </p><pre><code>bind pub -|- !done scrim:killtimerproc scrim:killtimer {nick host hand chan arg} { foreach t [timers] {   if {[string match "*scrim:timer*" $t]} {     killtimer [lindex $t 2]   } }}</code></pre></div>Note that timer and utimer is not the same, timer count in minutes, while utimer use seconds, so you dont want to mix those.</div></blockquote>Thank you sir for your help!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4596">exs-n0s</a> — Sat Aug 28, 2004 2:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2004-08-27T21:42:32-04:00</updated>

		<published>2004-08-27T21:42:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40288#p40288</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40288#p40288"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40288#p40288"><![CDATA[
This should work<div class="codebox"><p>Code: </p><pre><code>bind pub -|- !done scrim:killtimerproc scrim:killtimer {nick host hand chan arg} { foreach t [timers] {   if {[string match "*scrim:timer*" $t]} {     killtimer [lindex $t 2]   } }}</code></pre></div>Note that timer and utimer is not the same, timer count in minutes, while utimer use seconds, so you dont want to mix those.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Fri Aug 27, 2004 9:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[exs-n0s]]></name></author>
		<updated>2004-08-27T20:44:13-04:00</updated>

		<published>2004-08-27T20:44:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40287#p40287</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40287#p40287"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40287#p40287"><![CDATA[
nice, thanks GB, works like a charm now.  I decided to bind public command to kill the timer, but not too sure if im doing it right.  <br><div class="codebox"><p>Code: </p><pre><code>timer 1 scrim:timer proc scrim:timer {} {global basechan msgforeach c [channels] { if {(![string equal -nocase $c $basechan])} { puthelp "PRIVMSG $c :$msg" timer 1 scrim:timer }}}bind pub - !done scrim:killtimer proc scrim:killtimer {nick host hand chan arg} {foreach t [utimers] { if {[lindex $t 1] == "scrim:timer"} { killutimer [lindex $t end] } }</code></pre></div>And i get this error "[21:56] Tcl error [scrim:killtimer]: invalid command name "scrim:killtimer"".  mind me, i really hate doing timers <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4596">exs-n0s</a> — Fri Aug 27, 2004 8:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2004-08-27T16:23:57-04:00</updated>

		<published>2004-08-27T16:23:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40282#p40282</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40282#p40282"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40282#p40282"><![CDATA[
tcl timers dont loop, they run things once. So if you want something to happen every 10min, do something like this<br><div class="codebox"><p>Code: </p><pre><code>timer 10 proc:nameproc:name {} { # code goes here timer 10 proc:name}</code></pre></div>(You also might want to add a check to see if the timer is already running, before adding a new one)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Fri Aug 27, 2004 4:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[exs-n0s]]></name></author>
		<updated>2004-08-27T12:51:03-04:00</updated>

		<published>2004-08-27T12:51:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40273#p40273</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40273#p40273"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40273#p40273"><![CDATA[
<blockquote class="uncited"><div>Yes, thats what the script is supposed to do! To msg all the channels the bot is on (the script is working perfectly!). So how come you are saying the script doesn't seem to work? <br>*confused* </div></blockquote>Yeah, the script displays the messages to all channels fine.  But my problem here is that the timer doesnt work properlly.  The timer is only going off once, then dying, therefore the timer isnt looping itself as its supposed to :S<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4596">exs-n0s</a> — Fri Aug 27, 2004 12:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-08-27T07:42:00-04:00</updated>

		<published>2004-08-27T07:42:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40261#p40261</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40261#p40261"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40261#p40261"><![CDATA[
<blockquote class="uncited"><div>Yes, the message is being broadcasted to all channels the bot is in. </div></blockquote>Yes, thats what the script is supposed to do! To msg all the channels the bot is on (the script is working perfectly!). So how come you are saying the script doesn't seem to work?<br>*confused*<br><blockquote class="uncited"><div>$basechan would be set to a channel where the you can trigger the script no where else. </div></blockquote>Well actually to trigger it on a specific channel, $basechan should be set in the bind pub, pubm which ever you are using it shouldn't be set where it currently is.<br><br>if {(![string equal -nocase $c $basechan])} {<br>#This line means if current channel in channel list loop is *not* <br>#matching $basechan then it should activate the utimer.<br>#Hence this will activate for all channels except $basechan itself.<br><br><blockquote class="uncited"><div>I have no idea why the $i is there, but i read somewhere on the forums that 'incr' is used to loop timers.</div></blockquote>You already have looped all the channels where the bot is on so then you don't need a variable to count the number of channels. The variable [channels] is a list itself and will loop each element (channel) in the list.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Fri Aug 27, 2004 7:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[exs-n0s]]></name></author>
		<updated>2004-08-27T05:13:33-04:00</updated>

		<published>2004-08-27T05:13:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40260#p40260</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40260#p40260"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40260#p40260"><![CDATA[
Yes, the message is being broadcasted to all channels the bot is in.  $basechan would be set to a channel where the you can trigger the script, no where else.  I have no idea why the $i is there, but i read somewhere on the forums that 'incr' is used to loop timers :s<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4596">exs-n0s</a> — Fri Aug 27, 2004 5:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-08-27T03:58:41-04:00</updated>

		<published>2004-08-27T03:58:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40259#p40259</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40259#p40259"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40259#p40259"><![CDATA[
To me logicially it seems correct, don't know why it wouldn't work.<br>How many channels is your bot on? It must be on more than 1 channel right?<br><br>Can I know what value has the variable $basechan been set to?<br><br>I don't know why you needed a variable $i and used it in the foreach loop because it merely has no effect on what you are trying todo.<br><br>It can be used in perhaps say you want every puthelp message to be delayed say 1sec or 2sec after each other to prevent the bot from getting excess flood, then thats where it can be used effectively.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Fri Aug 27, 2004 3:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[exs-n0s]]></name></author>
		<updated>2004-08-27T03:45:12-04:00</updated>

		<published>2004-08-27T03:45:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40258#p40258</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40258#p40258"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40258#p40258"><![CDATA[
thanks for the reply awyeah.<br><div class="codebox"><p>Code: </p><pre><code>foreach c [channels] {  if {(![string equal -nocase $c $basechan])} {   utimer $interval "puthelp \"PRIVMSG $c :$msg\""   } } </code></pre></div>Doesnt seem to work.  It seems like its doing the same thing the old code is doing.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4596">exs-n0s</a> — Fri Aug 27, 2004 3:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-08-27T01:21:15-04:00</updated>

		<published>2004-08-27T01:21:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40251#p40251</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40251#p40251"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40251#p40251"><![CDATA[
Here, use this:<br><div class="codebox"><p>Code: </p><pre><code>foreach c [channels] {  if {(![string equal -nocase $c $basechan])} {   utimer $interval "puthelp \"PRIVMSG $c :$msg\""  } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Fri Aug 27, 2004 1:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[exs-n0s]]></name></author>
		<updated>2004-08-26T23:23:41-04:00</updated>

		<published>2004-08-26T23:23:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40248#p40248</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40248#p40248"/>
		<title type="html"><![CDATA[timer only goes on once]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40248#p40248"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set i 0foreach c [channels] {    if {[strlwr $c] != [strlwr $basechan]} {       utimer $interval [list puthelp "PRIVMSG $c :$msg"]      incr i   } }</code></pre></div><br>Well, for some reason, the continuous timer isnt working.  Only does the timer once, and its killed.  I cant seem to find out whats wrong.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4596">exs-n0s</a> — Thu Aug 26, 2004 11:23 pm</p><hr />
]]></content>
	</entry>
	</feed>
