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

	<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>2013-12-30T11:35:46-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Moti]]></name></author>
		<updated>2013-12-30T11:35:46-04:00</updated>

		<published>2013-12-30T11:35:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102423#p102423</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102423#p102423"/>
		<title type="html"><![CDATA[Help with flood script - just need help to fix something :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102423#p102423"><![CDATA[
Hi,<br><br>I downloaded the script floodcontrol.tcl 1.0.1 and change some things.<br>I change that if someone flood the channel at the first time he only lose his +v for 20 seconds and recived some messages.<br><br>If he continue to flood the bot kick + ban him and send him another messages.<br><br>My problem is that in the second part (When user flood again) the bot really kick + ban him and send the messages - but send him the 2 kinds of messages.<br><br>This is the part of the code with the messages.<br>Hope to some help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code>      if {[lsearch -exact [channel info $chan] "+repeat"] != -1} {        if {![info exists srepeat_count($uhost:$chan:$arg)]  &amp;&amp; [lsearch -exact $srepeat 0] == -1} {set srepeat_count($uhost:$chan:$arg) 0}        if {![info exists lrepeat_count($uhost:$chan:$arg)] &amp;&amp; [lsearch -exact $lrepeat 0] == -1} {set lrepeat_count($uhost:$chan:$arg) 0}        incr srepeat_count($uhost:$chan:$arg) 1; utimer [lindex $srepeat 1] [list unset -nocomplain srepeat_count($uhost:$chan:$arg)]        incr lrepeat_count($uhost:$chan:$arg) 1; utimer [lindex $lrepeat 1] [list unset -nocomplain lrepeat_count($uhost:$chan:$arg)]        if {$lrepeat_count($uhost:$chan:$arg) &gt;= [lindex $lrepeat 0]} {          if {![info exists chan_flooded($chan)]} {            lock:chan $chan            newchanban $chan *!$uhost \002violation\002 "Repeated Violation of Chat Rules: Spamming/Flooding" $repeatban            putquick "KICK $chan $nick :Repeated Violation of Chat Rules: Spamming/Flooding"            putserv "privmsg $nick :\00305WARNING:\00300 Please stop spamming/flooding the chat."            putserv "privmsg $nick :\00303STATUS:\00300 Banned (5 minutes)."            putserv "privmsg $nick :\00304REASON:\00300 Repeated violation of chat rules - spamming/flooding."            putserv "privmsg $nick :\00312MESSAGE:\00300 Hello again, $nick. You have been temporarily banned from the chat. This means for the next 5 minutes, you wil$            putserv "privmsg $nick :* You will be notified when the 5 minute ban is expired"            putlog "punishing offensive repeat flooders: $nick ($uhost) on $chan."            utimer 330 "putserv \"privmsg $nick :\00303STATUS:\00300\ In good standing.\""            utimer 331 "putserv \"privmsg $nick :\00312MESSAGE:\00300 Good news $nick, your 5 minute ban has expired and you are welcome to re-enter the chat. Please r$          }        } elseif {$srepeat_count($uhost:$chan:$arg) == [lindex $srepeat 0]} {          putquick "mode $chan -v $nick"          putserv "privmsg $nick :\00305WARNING:\00300 Please stop spamming/flooding the chat."          putserv "privmsg $nick :\00303STATUS:\00300 Muted (20 seconds)."          putserv "privmsg $nick :\00304REASON:\00300 Violation of chat rules - spamming/flooding."          putserv "privmsg $nick :\00312MESSAGE:\00300 Dear $nick, you have been muted. this means for the next 20 seconds, you will not be able to send messages to th$          utimer 20 "putquick \"MODE $chan +v $nick\""        }      }    }  }</code></pre></div>Really thanks ! <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=12277">Moti</a> — Mon Dec 30, 2013 11:35 am</p><hr />
]]></content>
	</entry>
	</feed>
