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

	<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-04-11T12:59:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-11T12:59:18-04:00</updated>

		<published>2005-04-11T12:59:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48015#p48015</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48015#p48015"/>
		<title type="html"><![CDATA[stop foreach]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48015#p48015"><![CDATA[
when I think about it... forget the idea, the foreach loop is long done probably before the first line is seen on the channel.<br>the only solution would probably be to change the putserv to puthelp (i strongly suggest this) and then make following bind:<br><div class="codebox"><p>Code: </p><pre><code>bind pub m !stop initforeachbreakproc initforeachbreak {nick uhost hand chan text} {  clearqueue help  return 1}</code></pre></div>I haven't tested it, but it should wipe all pending messages in the help queue (if you would wipe the server or mode queue, you could kill something important).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Mon Apr 11, 2005 12:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[crios]]></name></author>
		<updated>2005-04-11T10:58:29-04:00</updated>

		<published>2005-04-11T10:58:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48008#p48008</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48008#p48008"/>
		<title type="html"><![CDATA[stop foreach]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48008#p48008"><![CDATA[
sry i don't understand how i could use that in my script :/<br><br>maybe you can make an bigger example?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6090">crios</a> — Mon Apr 11, 2005 10:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-10T13:40:28-04:00</updated>

		<published>2005-04-10T13:40:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47951#p47951</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47951#p47951"/>
		<title type="html"><![CDATA[stop foreach]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47951#p47951"><![CDATA[
create a global var like breakforeach with boolan content (0 or 1).<br>make a public trigger to set it to 1 and add at the end of the foreach:<div class="codebox"><p>Code: </p><pre><code>if { $breakforeach } {  set breakforeach 0  break}</code></pre></div>if you concern the execution speed of this extra, than dont use ::breakforeach, but add breakforeach to global at the proc start. I tested it on real unix and cygwin, execution is about the half (if it matters for 2ms or 4ms ^^).<br><br>the public command could look like:<div class="codebox"><p>Code: </p><pre><code>bind pub m|m !stop initforeachbreakproc initforeachbreak {nick uhost hand chan text} {  set ::breakforeach 1  return 1}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Apr 10, 2005 1:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[crios]]></name></author>
		<updated>2005-04-10T13:01:53-04:00</updated>

		<published>2005-04-10T13:01:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47950#p47950</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47950#p47950"/>
		<title type="html"><![CDATA[stop foreach]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47950#p47950"><![CDATA[
Hi,<br><br>I have a proc with a<br><br>foreach player [split $data] {<br>...<br>putserv "PRIVMSG,...."<br><br>}<br><br>i want to create a stop command<br><br>when i say !stop it should stop the foreach because sometimes there are over 100 lines in player<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6090">crios</a> — Sun Apr 10, 2005 1:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
