Clone Protection
Written by Kintar0

Keep those pesky clones out, easily manage your channel and protect it from potential flooders. Here we have two items for clone scanning and on join clone protection. The code goes into mIRC remotes.

On Join Method

on @*:join:#: { if ($ialchan($wildsite,#,0) > 1) { ban -u30 # $nick 9 kick # $ialchan($wildsite,#,1).nick Please do not bring clones here! } }

Above we have an on join event which listens to joins on channel(s) you are op on. If you which to specify just a specific channel or channels, replace # on the first line with your channel(s). This script will kick/ban the first user matching the clone address and keep the joining user in. This will keep you safe incase the clone is due to a ghost where the user got disconnected but the server hasn't noticed yet. You may change 1 on the 2nd line to a higher value if you want to allow 1 or more clones to join without being banned. The ban is for 30 seconds which the -u30 switch is for. You can remove this or modify 30 according to your needs.

Be sure you have IAL (Internal Address List) on. To turn it on, type /ial on in mIRC. Also type /who #yourchannel to update the list. If you already have it on, just go on to the next section if you wish. Below we show a clone scanner which is performed to check manually.

Clone Scan Alias Method

alias clonescan { if ($1 ischan && $ial) { var %i = $ialchan(*,$1,0) , %c = 0 while (%i) { var %n = $ialchan($mask($ialchan(*,$1,%i),2),#,0) if (%n > 1) { inc %c var %mask = $mask($ialchan(*,$1,%i),2) inc %clone. [ $+ [ %mask ] ] if (%clone. [ $+ [ %mask ] ] == %n) { echo -a Clones: $gettok(%mask,2,64) ( $+ %clone. [ $+ [ %mask ] ] $+ ) } } dec %i } echo -a Total Clones Found: %c unset %clone.* } elseif ($1 !ischan) { echo -a You didn't specify a channel! } elseif ($ial == $false) { echo -a IAL is not on, type /ial on } }

The alias above is meant to be performed manually or when you choose. The format for usage is: /clonescan #channel If you do not specify a channel, it will not work. If you have done so correctly, it will list clones found, the clone's address, and the total number of clones. You can copy/paste this code into remotes. You can also find more complex clone scanners in our addons and scriptlets section.

If you find any errors or have any questions/comments, please contact us via email, memo, or our script forum. Thanks for your time.

2000-2001 ClanX Scripterz Organization