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

	<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>2005-07-14T15:34:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-14T15:34:47-04:00</updated>

		<published>2005-07-14T15:34:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52485#p52485</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52485#p52485"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52485#p52485"><![CDATA[
Thats why I do 4 tests and not only one.. Well actually more than 4.. But I guess I just have to live with it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Thu Jul 14, 2005 3:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-14T14:31:03-04:00</updated>

		<published>2005-07-14T14:31:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52483#p52483</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52483#p52483"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52483#p52483"><![CDATA[
lag, either with your bot or the server<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Thu Jul 14, 2005 2:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-14T14:12:34-04:00</updated>

		<published>2005-07-14T14:12:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52481#p52481</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52481#p52481"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52481#p52481"><![CDATA[
Now thats just wierd... I changed the script, restarted the bot, and tried it out.. Worked as posted above.. Then I tried again, and the same error appears again. Only delay between channel 3 and 4?!.....<br><br>......  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Thu Jul 14, 2005 2:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-14T14:01:37-04:00</updated>

		<published>2005-07-14T14:01:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52479#p52479</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52479#p52479"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52479#p52479"><![CDATA[
'puthelp' did the trick...<br><br>[19:58:25]      -› msg °InformiZle° announce Broadcasted announcement...<br>[19:58:38] [InformiZle] Broadcasted announcement...<br>[19:58:54] [InformiZle] Broadcasted announcement...<br>[19:59:08] [InformiZle] Broadcasted announcement...<br>[19:59:24] [InformiZle] Broadcasted announcement...<br><br>Roughly 15 seconds between...<br><br><br>Thanks again for the help Demond..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Thu Jul 14, 2005 2:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-14T13:47:58-04:00</updated>

		<published>2005-07-14T13:47:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52478#p52478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52478#p52478"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52478#p52478"><![CDATA[
try changing [puthelp] to [putserv] or [putquick] and see if anything changes; other than that, I fail to anything else causing your problem but somehow messed up original utimer queue code<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Thu Jul 14, 2005 1:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-14T13:29:06-04:00</updated>

		<published>2005-07-14T13:29:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52477#p52477</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52477#p52477"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52477#p52477"><![CDATA[
It's a completly new installation of Eggdrop (not windrop), basic configuration (only changed name, channel, some ports and such) and with only one custom script, this one.<br><br>This is the result, in a test I just did, with the code posted above:<br><br><span style="text-decoration:underline"><strong class="text-strong">Test 1</strong></span><br><br>[19:17:59]      -› msg °InformiZle° announce Broadcasted announcement...<br><br>Channel #1 -&gt; [19:18:10] [InformiZle] Broadcasted announcement...<br>Channel #2 -&gt; [19:18:12] [InformiZle] Broadcasted announcement...<br>Channel #3 -&gt; [19:18:27] [InformiZle] Broadcasted announcement...<br>Channel #4 -&gt; [19:18:28] [InformiZle] Broadcasted announcement...<br><br><br><span style="text-decoration:underline"><strong class="text-strong">Test 2</strong></span><br><br>[19:18:37]      -› msg °InformiZle° announce Broadcasted announcement...<br><br>Channel #1 -&gt; [19:18:40] [InformiZle] Broadcasted announcement...<br>Channel #2 -&gt; [19:18:42] [InformiZle] Broadcasted announcement...<br>Channel #3 -&gt; [19:18:56] [InformiZle] Broadcasted announcement...<br>Channel #4 -&gt; [19:18:58] [InformiZle] Broadcasted announcement...<br><br><br><span style="text-decoration:underline"><strong class="text-strong">Test 3</strong></span><br><br>[19:19:03]      -› msg °InformiZle° announce Broadcasted announcement...<br><br>Channel #1 -&gt; [19:19:11] [InformiZle] Broadcasted announcement...<br>Channel #2 -&gt; [19:19:13] [InformiZle] Broadcasted announcement...<br>Channel #3 -&gt; [19:19:27] [InformiZle] Broadcasted announcement...<br>Channel #4 -&gt; [19:19:29] [InformiZle] Broadcasted announcement...<br><br><br><span style="text-decoration:underline"><strong class="text-strong">Test 4</strong></span><br><br>[19:19:35]      -› msg °InformiZle° announce Broadcasted announcement...<br><br>Channel #1 -&gt; [19:19:40] [InformiZle] Broadcasted announcement...<br>Channel #2 -&gt; [19:19:42] [InformiZle] Broadcasted announcement...<br>Channel #3 -&gt; [19:19:56] [InformiZle] Broadcasted announcement...<br>Channel #4 -&gt; [19:19:58] [InformiZle] Broadcasted announcement...<br><br><br><strong class="text-strong">I noticed a pattern.. It does make a delay, but only between channel 2 and 3!? From channel 1 to 2, and 2 to 4 there is only the 2 second delay that the bot makes by default? Have any ideas why?</strong><br><br>[edit] Please be aware that I changed the delay to 15 seconds in the script! [/edit]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Thu Jul 14, 2005 1:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-14T11:01:38-04:00</updated>

		<published>2005-07-14T11:01:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52460#p52460</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52460#p52460"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52460#p52460"><![CDATA[
<blockquote class="uncited"><div>30 seconds after i send the trigger, the bot announces the message on all channels at the same time.</div></blockquote>that's simply not possible with the code as shown, you must have messed up something; that queue gets emptied one message at a time, every $::frequency seconds<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Thu Jul 14, 2005 11:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-14T10:26:17-04:00</updated>

		<published>2005-07-14T10:26:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52457#p52457</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52457#p52457"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52457#p52457"><![CDATA[
Actually.. It has an effect.. It delays the broadcast with 30 seconds.<br><br>30 seconds after i send the trigger, the bot announces the message on all channels at the same time.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Thu Jul 14, 2005 10:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-14T09:51:02-04:00</updated>

		<published>2005-07-14T09:51:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52455#p52455</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52455#p52455"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52455#p52455"><![CDATA[
Allready tried that.. I just set it to 30 and tried again.. No effect  <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=6440">TC^^</a> — Thu Jul 14, 2005 9:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-13T15:22:33-04:00</updated>

		<published>2005-07-13T15:22:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52423#p52423</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52423#p52423"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52423#p52423"><![CDATA[
increase frequency (actually the name of that variable is misleading - increasing it means your messages will show up with longer delay - but anyway)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Jul 13, 2005 3:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-13T15:12:39-04:00</updated>

		<published>2005-07-13T15:12:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52420#p52420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52420#p52420"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52420#p52420"><![CDATA[
So.. Tried to tie in your bit of code, to the script.. This it what I got from it. Does the announcements, but without the delay!?... I'm sure I've done something wrong, maybe put the code the wrong place. Please advice..<br><br><div class="codebox"><p>Code: </p><pre><code>bind bot - announce botannouncebind msg m announce gotannounceset queue {} set frequency 5 ;# seconds proc getqueue {} {  if {$::queue != {}} {   puthelp [lindex $::queue 0]   set ::queue [lreplace $::queue 0 0]  }  utimer $::frequency getqueue } proc putqueue {str} {  lappend ::queue $str } getqueue proc announce {text} {  putlog ":: Announce :: Announced to channels ( $text )"  foreach chan [channels] {    if {[botonchan $chan]} {      putqueue "privmsg $chan :$text"    }  }}proc botannounce {from cmd text} {  putlog ":: Announce :: $from instructed me to announce"  announce $text}proc gotannounce {nick uhost hand text} {  putlog ":: Announce :: $nick ($uhost) instructed me to announce"  putallbots "announce $text"  announce $text}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Wed Jul 13, 2005 3:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-11T17:49:11-04:00</updated>

		<published>2005-07-11T17:49:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52285#p52285</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52285#p52285"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52285#p52285"><![CDATA[
see my code <a href="http://forum.egghelp.org/viewtopic.php?t=9837" class="postlink">here</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Mon Jul 11, 2005 5:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TC^^]]></name></author>
		<updated>2005-07-11T16:18:40-04:00</updated>

		<published>2005-07-11T16:18:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52283#p52283</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52283#p52283"/>
		<title type="html"><![CDATA[Adding a delay on a loop ('foreach')]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52283#p52283"><![CDATA[
Demond provided me with this simple and wonderfull script , that nailed the request I had dead on, and i appreciate it very much. Now I'm working on tweaking it for my needs, and kinda 'learning TCL scripting by doing TCL scripting'.<br><br>I saw this problem comming, but was hoping I had a basic understanding enough to solve it myself... I was wrong...<br><br>The problem with the script, is that if I have more than one bot, a few perhaps, and all the bots is in 15-20 channels, then the server disconnects me for excess flood if i send a rather large broadcast message (well *doorh* right? I know...). <br><br>I was hoping to solve the problem, by adding som sort of delay. A delay that makes the script pause a few seconds before posting in each channel?!<br><br>I'm posting the raw code, as I got it, without my modifications and unsuccessfull tries to make it pause. And I'm hoping it can be solved rather simple, and someone will show me how <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><br><div class="codebox"><p>Code: </p><pre><code>bind bot - announce botannouncebind msg m announce gotannounceproc announce {text} {  foreach chan [channels] {    if {[botonchan $chan]} {      puthelp "privmsg $chan :$text"    }  }}proc botannounce {from cmd text} {  announce $text}proc gotannounce {nick uhost hand text} {  putallbots "announce $text"  announce $text}</code></pre></div>[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6440">TC^^</a> — Mon Jul 11, 2005 4:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
