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

	<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>2007-11-04T22:58:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[droolin]]></name></author>
		<updated>2007-11-04T22:58:47-04:00</updated>

		<published>2007-11-04T22:58:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77457#p77457</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77457#p77457"/>
		<title type="html"><![CDATA[Thank you also]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77457#p77457"><![CDATA[
I can see that bit of code being used for a few things that I've been planing to do, just never had an idea how to go about it.<br><br>droolin<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3562">droolin</a> — Sun Nov 04, 2007 10:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zircon]]></name></author>
		<updated>2007-10-22T03:39:57-04:00</updated>

		<published>2007-10-22T03:39:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76997#p76997</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76997#p76997"/>
		<title type="html"><![CDATA[adding join flood check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76997#p76997"><![CDATA[
Hello De Kus<br><br>     Thanks a lot for your help, and clear explanations. I appreciate, really. I ll do what you advised me. Thanks again <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8115">Zircon</a> — Mon Oct 22, 2007 3:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2007-10-20T08:07:29-04:00</updated>

		<published>2007-10-20T08:07:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76908#p76908</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76908#p76908"/>
		<title type="html"><![CDATA[adding join flood check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76908#p76908"><![CDATA[
Theoretically using puthelp is quite a good methode to prevent floodings. However too many putquick scritps often screw this.<br><br>I use a little helper for anti-flood protections I wrote myself.<div class="codebox"><p>Code: </p><pre><code>########## decrease# usage  : decrease &lt;var&gt;# return : 0 or 1 (can be discarded)## info   : usefull for save var decreasings, var cannot drop below 0 and no#          TCL error can occure#proc decrease {var} {if {[info exists ::$var]} {if {[set ::$var] &lt;= 1} {set ::$var 0} else {incr ::$var -1}return 0} else {putlog "decrease: Variable '$var' doesn't exist"return 1}}</code></pre></div>You should now create a global variable containing a counter check for this before you send the stuff. An abstract example would be:<br><div class="codebox"><p>Code: </p><pre><code>set example_c 0proc example {nick host hand chan} {  if {$::example_c &lt; 3} {    incr $::example_c    utimer 1 {decrease example_c}    #do stuff here  }  return 0}</code></pre></div>Some explanations:<br>- The helper function is used to avoid the variable to drop below 0 due to .rehash while there is a timer running<br>- The parameter to the helper function must be the variable name, not the variable content.<br>- the constants 3 and 1 in the above example reflect allowed executions x within the timespan y seconds. Note that 1 second can never be accurate, since utimer triggers on full seconds, therefore the actual timespan x is: 0s &lt; x &lt; 1s<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Oct 20, 2007 8:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zircon]]></name></author>
		<updated>2007-10-18T17:28:21-04:00</updated>

		<published>2007-10-18T17:28:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76866#p76866</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76866#p76866"/>
		<title type="html"><![CDATA[adding join flood check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76866#p76866"><![CDATA[
Hi all<br><br>      I think i ll have more chance here.  I have this little script that send a notice to everyone joining the channel. I want to prevent the bot from being laggued or disconnected when there is a join flood. I want to modify this script so the bot stop sending notices for 1 min, when there is 3 joins (or more) in 1 second. How can i do it ?<br><div class="codebox"><p>Code: </p><pre><code>bind join -|- * join_cultureproc join_culture {nick host hand chan} {  if {$chan == "#culture"} {puthelp "NOTICE $nick :tapez !help dans #culture pour avoir la liste des commandes"  }}</code></pre></div>Thanks in advance<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8115">Zircon</a> — Thu Oct 18, 2007 5:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
