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 "#SuKooN"
# 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 ###########
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 6
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 "KICK $chan $users :$clone_msg"
}
utimer $::clone_bantime [list putserv "MODE $chan -b *!*@$host"]
}
}
bind join - * join_clone
putlog "DeClone v0.3 Loaded."
----------------------------------------------------------------------------------
Tested in all format excellent work .. here are few result to show ..
[21:37] * MaSt3r sets mode: +b *!*@103.255.6.80
[21:37] * meri_bhn was kicked by MaSt3r (10Clones Are Not Allowed 120 Sec Ban ...!!!)
[21:37] * bhn_k_doud was kicked by MaSt3r (10Clones Are Not Allowed 120 Sec Ban ...!!!)
[21:37] * any_real_amil was kicked by MaSt3r (10Clones Are Not Allowed 120 Sec Ban ...!!!)
-------------------------------------------------------------------------------------
[14:00] * Joins: cRaZy` (~R-P@119.157.179.86)
[14:00] * F|irT sets mode: +v cRaZy`
- Clones from 119.157.179.86
- 1. cRaZy` (~R-P)
- 2. R-K (~R-P)
- 3. R-P (~R-P)
Not Kicking voice user match with clones... as i wanted .. good
----------------------------------------------------------------------------
[14:05] * Parts: +cRaZy` (~R-P@119.157.179.86)
[14:05] * Joins: cRaZy` (~R-P@119.157.179.86)
[14:05] * MaSt3r sets mode: +b *!*@119.157.179.86
[14:05] * R-K was kicked by MaSt3r (Clones Are Not Allowed 120 Sec Ban ...!!!)
[14:05] * R-P was kicked by MaSt3r (Clones Are Not Allowed 120 Sec Ban ...!!!)
[14:05] * cRaZy` was kicked by MaSt3r (Clones Are Not Allowed 120 Sec Ban ...!!!)
-------------------------------------------------------------------------------------
- Clones from id-234240.tooting.irccloud.com
- 1. boy19 (uid234240)
- 2. f-30 (uid234240)
- 3. Mard1 (uid234240)
---------------------------------------------------------------------------------
Protecting Some host i add like Cloud .. not reading clones on cloud host ..
-------------------------------------------------------------------------------------
i am running this srcipt on Dalnet .. No issue ... Thank Goes To SpiKe^^ to Helping it to make it write..
F|irT...!