ideally it would remove each kicked nick out of the stored nicks and kick with stacked kicks / bans in manner of kick nick,nick,nick,nick,nick, wich in many ircds results in quicker kicks as some ircds provide the multi kick per kick command ( dalnet 4 , unreal4 4 , inspircd 20 )17:04:07 Join : Carlin ~Seal@same.host.net
17:04:07 Join : Roman ~Francis@same.host.net
17:04:07 Join : Hardison ~Joe@same.host.net
17:04:07 Join : Burkett ~Felix@same.host.net
17:04:07 Join : Mauro ~Muhammad@same.host.net
17:04:07 Join : Ghislaine ~Matthews@same.host.net
17:04:07 Join : Butterfield ~Forman@same.host.net
17:04:07 Join : Morley ~Heck@same.host.net
17:04:07 Join : Clary ~Cassey@same.host.net
17:04:07 Join : Moya ~Banuelos@same.host.net
17:04:07 (@TCL-Tester) : +b *!*@same.host.net
17:04:07 @TCL-Tester Sets Mode on #tcl-test to: +b *!*@same.host.net
17:04:07 (10 Users) Are Banned Burkett Butterfield Carlin Clary Ghislaine Hardison Mauro Morley Moya Roman
17:04:07 (@TCL-Tester) : Carlin,Roman,Hardison Clones Are Not Allowed 120 Sec Ban ...!!!
17:04:08 Carlin Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
17:04:08 Roman Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
17:04:08 Hardison Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
17:04:08 (@TCL-Tester) : +b *!*@same.host.net
17:04:08 (@TCL-Tester) : Carlin,Roman,Hardison,Burkett Clones Are Not Allowed 120 Sec Ban ...!!!
17:04:08 Burkett Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
17:04:08 (@TCL-Tester) : +b *!*@same.host.net
17:04:09 (@TCL-Tester) : Carlin,Roman,Hardison,Burkett,Mauro Clones Are Not Allowed 120 Sec Ban ...!!!
17:04:10 Mauro Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
17:04:11 (@TCL-Tester) : +b *!*@same.host.net
17:04:13 (@TCL-Tester) : Carlin,Roman,Hardison,Burkett,Mauro,Ghislaine Clones Are Not Allowed 120 Sec Ban ...!!!
17:04:14 Ghislaine Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
17:04:15 (@TCL-Tester) : +b *!*@same.host.net
17:04:17 (@TCL-Tester) : Carlin,Roman,Hardison,Burkett,Mauro,Ghislaine,Butterfield Clones Are Not Allowed 120 Sec Ban ...!!!
17:04:18 Butterfield Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
17:04:19 (@TCL-Tester) : +b *!*@same.host.net
17:04:21 (@TCL-Tester) : Carlin,Roman,Hardison,Burkett,Mauro,Ghislaine,Butterfield,Morley Clones Are Not Allowed 120 Sec Ban ...!!!
17:04:22 Morley Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
17:04:23 (@TCL-Tester) : +b *!*@same.host.net
17:04:25 (@TCL-Tester) : Carlin,Roman,Hardison,Burkett,Mauro,Ghislaine,Butterfield,Morley,Clary Clones Are Not Allowed 120 Sec Ban ...!!!
17:04:26 Clary Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
17:04:27 (@TCL-Tester) : +b *!*@same.host.net
17:04:29 (@TCL-Tester) : Carlin,Roman,Hardison,Burkett,Mauro,Ghislaine,Butterfield,Morley,Clary,Moya Clones Are Not Allowed 120 Sec Ban ...!!!
17:04:30 Moya Kicked from #tcl-test By @TCL-Tester <> ( Clones Are Not Allowed 120 Sec Ban ...!!! )
it would also help to halt quicker the joining of clones to lock channel with +RM and unset with timer after max clone threshold, then to start kicking and setting modes after having channel locked wich would give eggdrop time to prioritize and possibly prevent disconnect with excess flood message
stacking banmasks in the case of multiple joins per clone IP would be effiecient as well rather than setting each seperate
used this code with debug msg to channel
Code: Select all
## DeClone v0.3 ##
# Set the next line as the kick msg you want to say
set clone_msg "10Clones Are Not Allowed 120 Sec Ban ...!!!"
# Set the next line as the number of clones to scan for
set clone_max 3
# Set the next line as the channels you want to run in (* = allchannels)
set clone_chans "#tcl-test"
# Set ban time (in seconds)
set clone_bantime 120
# Exempt +o users from this script ??
# 0 = No, do not exempt users with +o
# 1 = Yes, exempt users with +o
# 2 = Yes, also exempt users with +v
set clone_exemptops 1
# Set exempt users by standard "nick!user@host" mask ??
# If you do not have any mask to exempt: set clone_exemptmask {}
set clone_exemptmask {
*!*@DALnet
*!*@*.users.quakenet.org
*!*@*.irccloud.com
}
########### End Settings ###########
bind join - * join_clone
proc join_clone {nick uhost hand chan} {
global clone_msg clone_max clone_chans clone_exemptops
if {$clone_chans ne "*" && [lsearch -nocase $clone_chans $chan] == -1} { return }
if {[isbotnick $nick] || ![botisop $chan] || [matchattr $hand bm|m $chan]} { return }
if {[llength $::clone_exemptmask]} {
foreach mask $::clone_exemptmask {
if {[string match -nocase $mask $nick!$uhost]} { return }
}
}
set host [lindex [split $uhost @] 1]
set clonelist ""
foreach user [chanlist $chan] {
if {[string equal -nocase [lindex [split [getchanhost $user $chan] @] 1] $host]} {
set hn [nick2hand $user $chan]
if {$clone_exemptops>0 && ([isop $user $chan] || [matchattr $hn o|o $chan])} {
return
}
if {$clone_exemptops>1 && ([isvoice $user $chan] || [matchattr $hn v|v $chan])} {
return
}
lappend clonelist $user
}
}
if {[set count [llength $clonelist]] >= $clone_max} {
set max 20
putquick "privmsg $chan +b *!*@$host"
putquick "MODE $chan +b *!*@$host"
while {$count > 0} { ;# Thanks caesar #
if {$count > $max} {
set users [join [lrange $clonelist 0 [expr {$max - 1}]] ","]
set clonelist [lrange $clonelist $max end]
incr count -$max
} else {
set users [join $clonelist ","]
set count 0
}
putquick "privmsg $chan $users :$clone_msg"
putquick "KICK $chan $users :$clone_msg"
}
utimer $::clone_bantime [list putserv "MODE $chan -b *!*@$host"]
}
}
thanx