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

	<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-16T12:08:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-16T12:08:19-04:00</updated>

		<published>2005-07-16T12:08:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52611#p52611</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52611#p52611"/>
		<title type="html"><![CDATA[join / rejn and array question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52611#p52611"><![CDATA[
1) no, [bind join] will not be triggered by rejoining from a split, so you can safely forget about that, it's not a problem<br>2) you need to use [qinit $chan], [qput $chan $uhost], [qget $chan] or [qempty $chan]; but you don't need a queue for that, a simple list will suffice<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sat Jul 16, 2005 12:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-07-16T07:54:04-04:00</updated>

		<published>2005-07-16T07:54:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52585#p52585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52585#p52585"/>
		<title type="html"><![CDATA[join / rejn and array question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52585#p52585"><![CDATA[
For your question 2, now stated a bit clearly, I developed a script which actually does the same thing you want, and a bit more if I say so.<br><br>Here is the link, download it at see for yourself:<br><a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1162" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... ad&amp;id=1162</a><br><br>It is uses arrays for counting mass joins, mass parts and mass revolving doors or mass join/parts. Your array should have the $chan mentioned also.<br><br>Example:<div class="codebox"><p>Code: </p><pre><code>$clone_nicks($host:$chan)</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Jul 16, 2005 7:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-16T07:43:13-04:00</updated>

		<published>2005-07-16T07:43:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52582#p52582</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52582#p52582"/>
		<title type="html"><![CDATA[join / rejn and array question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52582#p52582"><![CDATA[
Care to explain how this "queue implementation" works and is used?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jul 16, 2005 7:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SaPrOuZy]]></name></author>
		<updated>2005-07-16T07:31:15-04:00</updated>

		<published>2005-07-16T07:31:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52581#p52581</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52581#p52581"/>
		<title type="html"><![CDATA[join / rejn and array question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52581#p52581"><![CDATA[
thanks for the reply<br><br>1) and 2)<br>am queuing hosts and nicks of pple joining a chan, so that in case i get let's say, 5 joins in 2 sec, i ban the hosts and kick the nicks.<br>but i don't want this to be triggered by nick rejoining from splits<br><br>i added this  - inside the proc bound to join -, it seems to work fine (i was lucky a split occured just after i rehashed hehe), but i wanted to be sure it wont mess up<div class="codebox"><p>Code: </p><pre><code>bind rejn - * { putlog  "$nick returned on $zchan from split"; return 1}</code></pre></div><br>2) i want to use the array so that i log each chan's joins separately, so far (beside the worry about the split rejoin thing) all my script works fine except that i can't run it for more than 1 chan<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4727">SaPrOuZy</a> — Sat Jul 16, 2005 7:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-07-16T07:03:19-04:00</updated>

		<published>2005-07-16T07:03:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52579#p52579</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52579#p52579"/>
		<title type="html"><![CDATA[join / rejn and array question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52579#p52579"><![CDATA[
1) Your proc1 will be activated whenever a user joins a channel. It doesn't have to be from a split, it can be a normal join as well. It will also trigger when the bot joins a channel itself.<br><br>Detecting split nicks rejoining with bind join would be foolish in my case. You can use bind rejn but you would have to check a variable in your .conf file:<br><div class="codebox"><p>Code: </p><pre><code># Set here the time (in seconds) to wait for someone to return from a netsplit# (i.e. wasop will expire afterwards). Set this to 1500 on IRCnet since its# nick delay stops after 30 minutes.set wait-split 600</code></pre></div><blockquote class="uncited"><div>SPLT (stackable)<br>bind splt &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;channel&gt;<br><br>Description: triggered when someone gets netsplit on the channel. Be aware that this may be a false alarm (it's easy to fake a netsplit signoff message on some networks); mask may contain wildcards and is matched against '#channel nick!user@host'. Anyone who is SPLT will trigger a REJN or SIGN within the next wait-split (defined in the config file) minutes.<br><br><br>REJN (stackable)<br>bind rejn &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;channel&gt;<br><br>Description: someone who was split has rejoined. mask can contain wildcards, and is matched against '#channel nick!user@host'.</div></blockquote>If the net re-joins after this interval of time, then it wouldn't be classified as bind rejn anymore, but it can activate bind join. Returning 0 could halt the procedure, or you can bind raw to the specific raw number if it exists for netsplits/rejoins and return 1 instead.<br><br>2) Secondly, what are you trying to accomplish with this queue system? -- trying todo. Maybe a smaller and easier method can be used.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Jul 16, 2005 7:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SaPrOuZy]]></name></author>
		<updated>2005-07-16T06:03:22-04:00</updated>

		<published>2005-07-16T06:03:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52573#p52573</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52573#p52573"/>
		<title type="html"><![CDATA[join / rejn and array question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52573#p52573"><![CDATA[
Hello there, <br>i have 2 questions:<br><br>1- if i have bind join - * proc1 <br>do nicks rejoining from a split activate proc1? <br>if it does, how can i ignore rejoining nicks and stop the proc from continuing<br><br>2- am using this queue implementation i found on the net:<div class="codebox"><p>Code: </p><pre><code>proc qinit {qvar} {            upvar 1 $qvar Q            set Q(i) 0            set Q(l) [list]            set Q(r) [list]}proc qput {qvar elem} {            upvar 1 $qvar Q            lappend Q(r) $elem}proc qget {qvar} {            upvar 1 $qvar Q            if {$Q(i) &gt;= [llength $Q(l)]} {                set Q(l) $Q(r)                set Q(r) [list]                set Q(i) 0            }            set head [lindex $Q(l) $Q(i)]            incr Q(i)            return $head}proc qempty {qvar} {            upvar 1 $qvar Q            return [expr {$Q(i) &gt;= [llength $Q(l)] &amp;&amp; [llength $Q(r)] == 0}]}</code></pre></div>if i try using like qinit q1($chan) , i get an error that var is not an array or something, how can i modify this queue implementation to allow arrays (q1($chan))<br><br>thanks alot.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4727">SaPrOuZy</a> — Sat Jul 16, 2005 6:03 am</p><hr />
]]></content>
	</entry>
	</feed>
