This is the Code I have so far.
Thanks
Code: Select all
#Set the next line as the kick msg you want to say
set clone_msg "Clones"
#Set the next line as the number of clones to scan for
set clone_max 1
#Set the next line as the channels you want to run in
set clone_chans "#cmx-appz"
set noclonehost {
"*.falcon-irc.net"
}
proc join_clone {nick uhost hand chan} {
global clone_msg clone_max clone_chans botnick noclonehost
if {([lsearch -exact [string tolower $clone_chans] [string tolower $chan]] != -1) || ($clone_chans == "*") && ![matchattr $hand m|m $chan] && ![matchattr $hand b] && ![isbotnick $nick] && [botisop $chan]} {
if {$noclonehost == $uhost} {return 0}
set host [lindex [split $uhost @] 1]; set count 0
foreach i [chanlist $chan] {
if {[string equal -nocase $host [lindex [split [getchanhost $i $chan] @] 1]]} {
incr count
}
}
if {$count >= $clone_max} {
putserv "KILL $clone :$clone_msg" -next
foreach clone [chanlist $chan] {
if {[string equal -nocase $host [lindex [split [getchanhost $i $chan] @] 1]]} {
putserv "KILL $clone :$clone_msg" -next
}
}
}
}
}