This snippet checks users on join and if there are 2 or more with the same !@host.domain.com it changes their nicknames' color. If there are more than 14 pairs of clones then the nicknames' colors will start to repeat. It also has a popup which allows you to kick/ban clones easier. Just try it...
ON *:JOIN:#:{
var %clone = 1
if ($ialchan($wildsite,#,0) > 1) && ($($+(%,clones,.,$wildsite,.,$chan,.,$network),2) == $null) {
if ($($+(%,colors,.,$chan,.,$network),2) == $null) {
set $+(%,colors,.,$chan,.,$network) 2
set $+(%,clones,.,$wildsite,.,$chan,.,$network) $ialchan($wildsite,#,0) $($+(%,colors,.,$chan,.,$network),2)
while %clone <= $ialchan($wildsite,#,0) {
cline $gettok($($+(%,clones,.,$wildsite,.,$chan,.,$network),2),2,32) # $ialchan($wildsite,#,%clone).nick
inc %clone
}
}
elseif ($($+(%,colors,.,$chan,.,$network),2) != $null) && ($($+(%,colors,.,$chan,.,$network),2) < 15) {
inc $+(%,colors,.,$chan,.,$network)
set $+(%,clones,.,$wildsite,.,$chan,.,$network) $ialchan($wildsite,#,0) $($+(%,colors,.,$chan,.,$network),2)
while %clone <= $ialchan($wildsite,#,0) {
cline $gettok($($+(%,clones,.,$wildsite,.,$chan,.,$network),2),2,32) # $ialchan($wildsite,#,%clone).nick
inc %clone
}
}
elseif ($($+(%,colors,.,$chan,.,$network),2) != $null) && ($($+(%,colors,.,$chan,.,$network),2) > 15) {
set $+(%,colors,.,$chan,.,$network) 2
set $+(%,clones,.,$wildsite,.,$chan,.,$network) $ialchan($wildsite,#,0) $($+(%,colors,.,$chan,.,$network),2)
while %clone <= $ialchan($wildsite,#,0) {
cline $gettok($($+(%,clones,.,$wildsite,.,$chan,.,$network),2),2,32) # $ialchan($wildsite,#,%clone).nick
inc %clone
}
}
}
elseif ($ialchan($wildsite,#,0) > 1) && ($($+(%,clones,.,$wildsite,.,$chan,.,$network),2) != $null) {
set $+(%,clones,.,$wildsite,.,$chan,.,$network) $ialchan($wildsite,#,0) $gettok($($+(%,clones,.,$wildsite,.,$chan,.,$network),2),2,32)
while %clone <= $ialchan($wildsite,#,0) {
cline $gettok($($+(%,clones,.,$wildsite,.,$chan,.,$network),2),2,32) # $ialchan($wildsite,#,%clone).nick
inc %clone
}
}
}
menu nicklist {
$iif(($me isop #), Ban clones):{
set %reason $?="Reason ?"
if ($ialchan($address($1,2),#,0) > 1) {
var %nicks = 1
var %addrs = ($ialchan($address($1,2),#,0)
while $ialchan($address($1,2),#,%nicks) >= %addrs {
if (%reason != $null) .ban -k $chan $ialchan($address($1,2),#,%nicks).nick 2 %reason | unset $+(%,clones,.,$address($1,2),.,$chan,.,$network)
inc %nicks
}
dec $+(%,colors,.,$chan,.,$network)
}
elseif ($ialchan($address($1,2),#,0) == 1) {
if (%reason != $null) .ban -k $chan $1 2 %reason
}
}
}
ON *:DISCONNECT:{ unset $+(%,clones,.,*,.,*,.,$network) | unset $+(%,colors,.,*,.,$network) }
ON me:*:PART:#:{ unset $+(%,clones,.,*,.,*,.,$network) | unset $+(%,colors,.,$chan,.,$network) }
ON *:PART:#:{ if ($($+(%,clones,.,$address($nick,2),.,$chan,.,$network),2) != $null) && ($ialchan($address($nick,2),#,0) == 1) { dec $+(%,colors,.,$chan,.,$network) | unset $+(%,clones,.,$address($nick,2),.,$chan,.,$network) } }
ON *:KICK:#:{ if ($($+(%,clones,.,$address($knick,2),.,$chan,.,$network),2) != $null) && ($ialchan($address($knick,2),#,0) == 1) { dec $+(%,colors,.,$chan,.,$network) | unset $+(%,clones,.,$address($knick,2),.,$chan,.,$network) } }
on me:*:join:#:{
inc $+(%,who,.,$cid,#)
.timer 1 5 who #
}
raw 352:*:{ if ($($+(%,who,.,$cid,$2),2)) halt }
raw 315:*:{ halt }