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

	<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>2009-02-25T13:26:08-04:00</updated>

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

		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-02-25T13:26:08-04:00</updated>

		<published>2009-02-25T13:26:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87554#p87554</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87554#p87554"/>
		<title type="html"><![CDATA[namespace, foreach - problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87554#p87554"><![CDATA[
I have it on default 0, but i tried to change it to 1, no effect.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Wed Feb 25, 2009 1:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-02-25T13:19:50-04:00</updated>

		<published>2009-02-25T13:19:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87553#p87553</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87553#p87553"/>
		<title type="html"><![CDATA[namespace, foreach - problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87553#p87553"><![CDATA[
Could you tell me how you set these settings?<div class="codebox"><p>Code: </p><pre><code># Allow identical messages in the mode queue?#set double-mode # Allow identical messages in the server queue?#set double-server # Allow identical messages in the help queue?#set double-help </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Feb 25, 2009 1:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-02-25T08:19:09-04:00</updated>

		<published>2009-02-25T08:19:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87550#p87550</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87550#p87550"/>
		<title type="html"><![CDATA[namespace, foreach - problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87550#p87550"><![CDATA[
lag, dont think so<br><br>iim testing it on myown localhost ircd server<br><br>i found smth else, this script:<div class="codebox"><p>Code: </p><pre><code>bind pub - !test test_procproc test_proc { nick uhost hand chan arg } {        set blah [open "ble.txt" r]        set all [read $blah]        close $blah        foreach line [split $all "\n"] {                puthelp "PRIVMSG $nick :$line"        }}</code></pre></div>ble.txt:<div class="codebox"><p>Code: </p><pre><code>aaaabbbbccccddddeeeeffffgggghhhh</code></pre></div>User1 is making !test on chan, after when bot prints 1st line to user1, user2 is making !test too:<br><br>user1 output:<br>aaab<br>bbbb<br>cccc<br>ddd<br>eeee<br>ffff<br>gggg<br>hhhh<br><br>user2 output:<br>bbbb<br>cccc<br>ddd<br>eeee<br>ffff<br>gggg<br>hhhh<br>aaaa<br><br>it's messy, ok<br><br>now, if i change script:<div class="codebox"><p>Code: </p><pre><code>bind pub - !test test_procproc test_proc { nick uhost hand chan arg } {        set blah [open "ble.txt" r]        set all [read $blah]        close $blah        foreach line [split $all "\n"] {                puthelp "PRIVMSG $nick :$line [queuesize]" #extra [queuesize] here        }}</code></pre></div>And the same situation, user1 test1, after first line, user2 !test, output:<br><br>user1:<br>aaaa 0<br>bbbb 1<br>cccc 2<br>dddd 3<br>eeee 4<br>ffff 5<br>gggg 6<br>hhhh 7<br>8<br><br>user2:<br>aaaa 8<br>bbbb 9<br>cccc 10<br>dddd 11<br>eeee 12<br>ffff 13<br>gggg 14<br>hhhh 15<br>16<br><br>now its cool, any solution? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>tested couple of times<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Wed Feb 25, 2009 8:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-02-24T20:12:51-04:00</updated>

		<published>2009-02-24T20:12:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87545#p87545</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87545#p87545"/>
		<title type="html"><![CDATA[namespace, foreach - problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87545#p87545"><![CDATA[
Have you ever thought, maybe this is related to latency?<br><br>Instead of running your tests where lag (latency) can cause messages to fall out or order. Foreach executes instantaneously as it does the putserv. All of this happens so fast, lag is certainly a factor when reading reply times spewed onto irc. Instead of using that putserv use a putlog where lag cannot come in play, and you will see lag is the culprit.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Tue Feb 24, 2009 8:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caramba]]></name></author>
		<updated>2009-02-24T18:58:37-04:00</updated>

		<published>2009-02-24T18:58:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87543#p87543</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87543#p87543"/>
		<title type="html"><![CDATA[namespace, foreach - problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87543#p87543"><![CDATA[
Hey<br><br>I tested it on TCL 8.4.12, 8.5.5 with eggdrop 1.6.18.<br>The same problem on both.<br><br>Like tomekk said, it's something wrong with queue. <br>I don't know how to fix it. <br>I changed in config "max-queue-msg" no effect.<br>I tried puthelp/putquick/putserv - nothing.<br><br>There is no possibility to send more data (line by line) to 2 or more users in the same time?<br><br>Regards<br>M.<br><br>P.S<br>If i made putlog instead put* i got messages okey, i mean:<br><br>a<br>b<br>c<br>d<br><br>a<br>b<br>c<br>d<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10507">caramba</a> — Tue Feb 24, 2009 6:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-02-24T19:23:46-04:00</updated>

		<published>2009-02-24T18:53:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87542#p87542</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87542#p87542"/>
		<title type="html"><![CDATA[namespace, foreach - problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87542#p87542"><![CDATA[
damn, i have the same problem in many scripts.<br><br>for example, we have text file:<br>row<br>row2<br>row3<br><br>etc etc.<br><br>And now, we have a script with:<br>bind pub - !test foreach_proc<br><br>...<br>foreach line [file data] {<br>            puthelp "privmsg $nick :$line"<br>}<br>...<br><br>Its working good for one person.<br>Problem begins when 2 or more ppl is using this command in one time.<br><br>Some problem with eggdrop queue, don't know. <br>I tried to do my own queue etc. but no effect (with timers, user by user).<br><br>Script is making this foreach pretty fast (whole data is landing in command queue) and after,  script is going to next line when bot outputing messages and im getting mess.<br><br>user1<br>row<br>row2<br>row3<br><br>user2<br>row2<br>row<br>row3<br><br>or something<br><br>P.S<br>Many scripts on net have this problem. (scripts which printing many lines of data and can be used by 2 or more ppl in the same time by some command)<br>I think my last (and other ;/) two scripts from request too.<br>I mean football-table/profile scripts.<br><br>It funny cause i dont remember how long i'm programming for eggdrop, all other scripts are working ok, but this "parallel" output is horible.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Tue Feb 24, 2009 6:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-02-21T13:56:12-04:00</updated>

		<published>2009-02-21T13:56:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87505#p87505</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87505#p87505"/>
		<title type="html"><![CDATA[namespace, foreach - problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87505#p87505"><![CDATA[
That's odd, very odd..<br><br>Since eggdrop operates in a non-threaded fashion, each binding will block until completed, so the second !do won't be processed until the first one is actually completed.<br><br>This would actually point a finger at the queue-system, as putquick does not send the command instantly, but places it in a queue to be send as soon as possible. However, this breaking on foreach but no other loop-constructs points in other directions.<br><br>Do you think you could add som putlog's in there, especially within the loop logging the message to be queue'd, and anything else possibly of value?<br>Also, could you post details on version of eggdrop and tcl?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Feb 21, 2009 1:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caramba]]></name></author>
		<updated>2009-02-21T13:16:31-04:00</updated>

		<published>2009-02-21T13:16:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87504#p87504</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87504#p87504"/>
		<title type="html"><![CDATA[namespace, foreach - problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87504#p87504"><![CDATA[
Hi everyone<br><br>simple script:<div class="codebox"><p>Code: </p><pre><code>bind pub - !do do_procproc do_proc {unick uhost uhand uchan uarg} {        namespace eval $unick {                set nickname [lindex [split [namespace current] ":"] 2]                set letters {a b c d e f g}                foreach letter [split $letters] {                        putquick "PRIVMSG $nickname :$letter"                }        }}</code></pre></div>We have on one channel, user1 and user2.<br><br>When user1 type !do script is writing letters, yeah that's okey.<br>Now, after 2 seconds user2 is typing !do too and the problem begins..<br><br>user1, pm:<div class="codebox"><p>Code: </p><pre><code>abcdefg</code></pre></div>user2, pm:<div class="codebox"><p>Code: </p><pre><code>defgabc</code></pre></div>Can someone help with that? <br>How to make this to work? <br>I mean how to make this to "parallel"...<br><br>If i tried without "foreach", just some simple incr var 1 inside namespace, it was good.<br><br>I could make !do on first and second user and all were good, numbers were ok for both of them. <br>I don't know why its not working with foreach/for.<br><br>Thanks!<br><br>P.S<br>Sorry for my bad english.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10507">caramba</a> — Sat Feb 21, 2009 1:16 pm</p><hr />
]]></content>
	</entry>
	</feed>
