this will ban and kick out cloned nicks like:
nick123
nick893
nick982
nick165
nick672
nick98387
nickjhe98
also it checks for cloned hosts/ips
use this code with the enforce ban code i posted to make it kick out clones faster:
http://hawkee.com/snippet/18594/
i tested it and this is an example of its working
http://dpaste.com/2P53DJM.txt
on *:JOIN:#: {
if ($nick(#,$me,@&~%)) {
if (%Netsplit-Detected. [ $+ [ %netsplitchan ] $+ . $+ [ $network ] ]) { halt }
var %Clone.join.flood2 = $+(*!*@*.,$gettok($address($nick,2),-2,46),.,$gettok($address($nick,2),-1,46))
if (%clone-join. [ $+ [ # ] $+ . $+ [ %Clone.join.flood2 ] ] == $null) {
set -u3 %clone-join. [ $+ [ # ] $+ . $+ [ %Clone.join.flood2 ] ] 1
}
else { inc %clone-join. [ $+ [ # ] $+ . $+ [ %Clone.join.flood2 ] ] }
if (%clone-join. [ $+ [ # ] $+ . $+ [ %Clone.join.flood2 ] ] >= 2) {
if (%modechanx7 != $true) {
.raw mode $chan +b %Clone.join.flood2
set -u3 %modechanx7 $true
}
}
var %Clone.join.flood = $+(*!*@,$remove($gettok($address($nick,2),1-2,46),*!*@),.*)
if (%clone-join. [ $+ [ # ] $+ . $+ [ %Clone.join.flood ] ] == $null) {
set -u3 %clone-join. [ $+ [ # ] $+ . $+ [ %Clone.join.flood ] ] 1
}
else { inc %clone-join. [ $+ [ # ] $+ . $+ [ %Clone.join.flood ] ] }
if (%clone-join. [ $+ [ # ] $+ . $+ [ %Clone.join.flood ] ] >= 2) {
if (%modechan1MR76567 != $true) {
.raw mode $chan +b %Clone.join.flood
set -u3 %modechan1MR76567 $true
}
}
var %join.flood.ident = $left($remove($gettok($address($nick,3),1,$asc(@)),*!*),4)
if (%join. [ $+ [ # ] $+ . $+ [ %join.flood.ident ] ] == $null) {
set -u3 %join. [ $+ [ # ] $+ . $+ [ %join.flood.ident ] ] 1
}
else { inc %join. [ $+ [ # ] $+ . $+ [ %join.flood.ident ] ] }
if (%join. [ $+ [ # ] $+ . $+ [ %join.flood.ident ] ] >= 2) {
if (%modechan1MR541 != $true) {
.raw mode $chan +b $+(*!,$left($gettok($gettok($address($nick,5),1,64),2,33),5),*@*)
set -u3 %modechan1MR541 $true
}
}
var %join.flood = $+($left($nick,4),*!*@*)
if (%join. [ $+ [ # ] $+ . $+ [ %join.flood ] ] == $null) {
set -u3 %join. [ $+ [ # ] $+ . $+ [ %join.flood ] ] 1
}
else { inc %join. [ $+ [ # ] $+ . $+ [ %join.flood ] ] }
if (%join. [ $+ [ # ] $+ . $+ [ %join.flood ] ] >= 2) {
if (%modechan1MR != $true) {
set -u3 %clnicks2 1
.raw mode $chan +b %join.flood
set -u3 %modechan1MR $true
}
}
}
}
ON !^*:QUIT: {
var %netsplit2 1
while ($comchan($nick,%netsplit2)) {
var %netsplitchan $v1
if (*.* *.* iswm $1-2) && !$3 && (!%Netsplit-Detected. [ $+ [ %netsplitchan ] $+ . $+ [ $network ] ]) {
set -z %Netsplit-Detected. [ $+ [ %netsplitchan ] $+ . $+ [ $network ] ] 300
}
inc %netsplit2
}
halt
}
somehow hawkee wont allow changes to posts i wanted to update it but i get weird replies about adding code while code is there and already posted
but its a good thing to think about the netsplit scenario