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

	<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>2022-09-24T00:34:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CP1832]]></name></author>
		<updated>2022-09-24T00:34:07-04:00</updated>

		<published>2022-09-24T00:34:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111421#p111421</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111421#p111421"/>
		<title type="html"><![CDATA[Sendq exceeded avoiding script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111421#p111421"><![CDATA[
In order to avoid setting channels to active and inactive several times, I added a check to avoid setting its status again and again...<div class="codebox"><p>Code: </p><pre><code>## Delay Join ##foreach bind [binds active] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}foreach bind [binds inactive] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}set joindelay 60bind evnt - connect-server inactiveproc inactive {type} {  global i  set i 0  foreach chan [channels] {if {![channel get $chan inactive]} {putlog "Passing to inactive $chan"channel set $chan +inactive}  }}bind evnt - init-server activeproc active {type} {global i joindelayif {![info exists i]} {set i 0}if { $i &lt; [ llength [split [channels]] ] } {if { $i == 0 } { set chan [ string range [lindex [split [channels]] $i] 1 end-1]} else { set chan [lindex [split [channels]] $i] }if {[channel get $chan inactive]} {putlog "Passing to active $chan"channel set $chan -inactive }    utimer $joindelay [list active type]incr i} else { set i 0}}putlog "Delay join"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12450">CP1832</a> — Sat Sep 24, 2022 12:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CP1832]]></name></author>
		<updated>2022-09-23T21:25:59-04:00</updated>

		<published>2022-09-23T21:25:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111420#p111420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111420#p111420"/>
		<title type="html"><![CDATA[Sendq exceeded avoiding script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111420#p111420"><![CDATA[
<blockquote class="uncited"><div>Not sure to understand why you play with unbinds. And why you bind all the events.</div></blockquote>I unbind because I forget to unbind when modifying the script and the bind remains.<blockquote class="uncited"><div>You can just use these two binds:<div class="codebox"><p>Code: </p><pre><code>bind evnt - connect-server inactivebind evnt - init-server join:delay</code></pre></div></div></blockquote>That's a good point, I'll modify that.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12450">CP1832</a> — Fri Sep 23, 2022 9:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-09-23T18:14:32-04:00</updated>

		<published>2022-09-23T18:14:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111419#p111419</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111419#p111419"/>
		<title type="html"><![CDATA[Sendq exceeded avoiding script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111419#p111419"><![CDATA[
Not sure to understand why you play with unbinds. And why you bind all the events.<br><br>You can just use these two binds:<div class="codebox"><p>Code: </p><pre><code>bind evnt - connect-server inactivebind evnt - init-server join:delay</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Fri Sep 23, 2022 6:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CP1832]]></name></author>
		<updated>2022-09-22T20:56:03-04:00</updated>

		<published>2022-09-22T20:56:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111418#p111418</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111418#p111418"/>
		<title type="html"><![CDATA[Sendq exceeded avoiding script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111418#p111418"><![CDATA[
I have an eggdrop that connects to several crowded channels, so every once and again, when the bot crashed or got stoned, the eggdrop would get kicked out of the network because it would exceed the sendq data limit. So to stop that, I had to set some channels to inactive and enable them one at a time. Finally, I figured out that a script should do that. The scripts sets all the bot's channels to inactive when reloading, disconnecting or reconnecting and sets its channel to active one channel at a time after n (in this example, 60) seconds.<div class="codebox"><p>Code: </p><pre><code>## Delay Join ##foreach bind [binds join:delay] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}foreach bind [binds inactive] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}set joindelay 60bind evnt - sigterm inactivebind evnt - sigill inactivebind evnt - sigquit inactivebind evnt - sighup inactivebind evnt - disconnect-server inactivebind evnt - loaded inactivebind evnt - connect-server inactiveproc inactive {type} {  foreach channel [channels] {putlog "Setting $channel to inactive"channel set $channel +inactive  }}bind evnt - init-server join:delayproc join:delay {type} {global i joindelayif {![info exists i]} {set i 0}if { $i &lt; [ llength [split [channels]] ] } {if { $i == 0 } { set chan [ string range [lindex [split [channels]] $i] 1 end-1]} else { set chan [lindex [split [channels]] $i] }putlog "Setting $chan to active"channel set $chan -inactive    utimer $joindelay [list join:delay type]incr i} else { set i 0}}putlog "Delay join"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12450">CP1832</a> — Thu Sep 22, 2022 8:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
