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

	<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-11-12T22:13:11-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sedition]]></name></author>
		<updated>2022-11-12T22:13:11-04:00</updated>

		<published>2022-11-12T22:13:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111507#p111507</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111507#p111507"/>
		<title type="html"><![CDATA[antirepeat/antiflood]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111507#p111507"><![CDATA[
I need help for someone to repair this tcl it is very good its function is two in one ..<br>it is anti repetitions of texts and warns before kicking<br>It is anti-flood and launches warning phrases before kicking. It worked perfectly until eggdrop version 1.19.<br><div class="codebox"><p>Code: </p><pre><code>#############################################################autokick de flood normal e repeat flood v3.3#repeatflood and normalfood autokick.. #by fabulous (fabulous@t7ds.com.br)#ban by banlist(0) or just +b(1) ?set floodbantype 1#type of ban to execute:#ban mask:#  0 = *!*@host.com#  1 = *!*ident@host.comset floodbanmask 1#which chans to ignore flood? (spaces between them)set fignorecanais "#enigmas"#lines to floodnormal are defined on .conf file of the bot (set flood-chan)#how much repeated lines?set repeat-kick 3#ATTENTION: to adjust the max floodlines(not the repeatflood) you must modify the .conf file#of the bot at "flood-chan" or by .chanset flood-chan l:t (l = lines, t = time)# kick to throw messagesset fkick(1) "flood try to write everything on one line please.. by writing like this you cause flood..to know our rules type !rules in the open channel"set fkick(2) "do you like the ban? if you don't like the ban then don't flood please on %chan..to know our rules type !rules in the open channel"set fkick(3) "Flood don't do it ok.. to know our rules type !rules in the open channel"#msgs de kick do repeatflood#kick msgs to repeatfloodset frkick(1) "stop repeating please with one we already read all... to know our rules type ! rules in the open channel"set frkick(2) "stop repeating or you will be banned, to know our rules type !rules in the open channel"set frkick(3) "Flood stop, to know our rules type !rules in the open channel"#ban msg to put in banlistset fkick(b) "flood detected please just to know our rules type !rules in the open channel"set frkick(b) "flood for replays calm your enter key to know our rules type !rules in the open channel"#ban on the second or third line? (2 ou 3)set banirapos 3################################################################################################################################################putlog "flood autokick v3.3 by fabulous loaded"bind flud - pub kick_floodproc kick_flood {nick uhost hand type chan} {    global banmesmo fkick fignorecanais    if {![botisop $chan]} { return 0 }    if {[isop $nick $chan]} { return 0 }    foreach c $fignorecanais {        if {[string toupper $chan] == [string toupper $c]} { return 0 }    }    switch [cbf $nick $chan $fkick(b)] {        "1" { putkick $chan $nick [q $chan $fkick(1)] }        "2" { putkick $chan $nick [q $chan $fkick(2)] }        "3" { putkick $chan $nick [q $chan $fkick(3)] }    }    return 1}proc q {chan args} {    set args [lindex $args 0]    regsub -all "%chan" $args "$chan" args    return $args}bind pubm - * repeat_pubmproc repeat_pubm {nick uhost hand chan text} {    global repeat_last repeat_num repeat-kick rkicks fignorecanais frkick    if {![botisop $chan]} { return 0 }    if {[isop $nick $chan]} { return 0 }    foreach c $fignorecanais {        if {[string toupper $chan] == [string toupper $c]} { return 0 }    }    if [info exists repeat_last([set n [string tolower $nick]])] {        if {[string compare [string tolower $repeat_last($n)] \            [string tolower $text]] == 0} {            if {[incr repeat_num($n)] &gt;= ${repeat-kick}} {                switch [cbf $nick $chan $frkick(b)] {                    "1" { putkick $chan $nick $frkick(1) }                    "2" { putkick $chan $nick $frkick(2) }                    "3" { putkick $chan $nick $frkick(3) }                }                unset repeat_last($n)                unset repeat_num($n)            }            return        }    }    set repeat_num($n) 1    set repeat_last($n) $text}proc repeat_timr {} {    global repeat_last    catch {unset repeat_last}    catch {unset repeat_num}    timer 1 repeat_timr}if ![regexp repeat_timr [timers]] {    timer 1 repeat_timr}proc cbf {nick chan motv} {    global banmesmo cbf floodbantype floodbanmask banirapos    set banmask ""    set themask [list [getchanhost $nick $chan]]    set chan [list $chan]    if {($themask == "*") || ($themask == "")} { return }    if {![info exists cbf($themask:$chan)]} {         set cbf($themask:$chan) 1    } else { incr cbf($themask:$chan) 1 }    set temp $cbf($themask:$chan)    if {$banirapos == 2} { if {$temp == 1} {set cbf($themask:$chan) 2 } ; if {$temp == 2} {set cbf($themask:$chan) 3} }    if {$cbf($themask:$chan) &gt; 2} {         if {$floodbanmask == "0"} {               scan $themask "%\[^@]@%s" banlamer banlamer               set banmask *!*@$banlamer             } {               set banmask *!$themask             }         if {$floodbantype == 0} {               newchanban $chan $banmask bot $motv             } {            pushmode $chan +b $banmask             }        unset [list cbf($themask:$chan)]        flushmode $chan        return 3    } else {        timer 5 [list eunset cbf($themask:$chan)]        return $cbf($themask:$chan)    }}proc eunset {n} {    if {[info exists $n]} { unset $n }}</code></pre></div>This is the error that I got in the current eggdrop, it only warns but does not apply the ban<div class="codebox"><p>Code: </p><pre><code>&lt;(reebot&gt; [17:32:46] Tcl error in script for 'timer23119'[21:49:10] Tcl error [repeat_pubm]: invalid channel: {#mundo}</code></pre></div>please someone to fix the time error in applying the ban<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11854">Sedition</a> — Sat Nov 12, 2022 10:13 pm</p><hr />
]]></content>
	</entry>
	</feed>
