Henry Posted February 27, 2012 Report Posted February 27, 2012 (edited) menu channel,menubar { Clone Detection settings .$iif($group(#CloneDetect) == on,Disable,Enable) clone scan on join: { var %status = $iif($group(#CloneDetect) == on,Disable,Enable) $+(.,%status) #CloneDetect echo 7 -at * On join clone scanning $+(%status,d.) Users will $iif(%status == Disable,no longer,now) be scanned for clones when they join } .$iif($active ischan,Scan for clones in $active):CloneScan } #CloneDetect on on *:join:#: { if ($address($nick,2) == $address($me,2)) halt if ($read(allowedhost.txt,w,$address($nick,2))) halt if ($ial($address($nick,2),0) > 1) { var %x = 1 while (%x <= $ial($address($nick,2),0)) { var %clones = $iif(%clones,%clones &) 4 $ial($address($nick,2),%x).nick inc %x } echo 10 -t $chan [Clones Detected] %clones @ $site } } #CloneDetect end alias CloneScan { if ($1 == on) { if ($group(#CloneDetect) == on) Echo 4 -at Clone Scanning on join is already enabled else { .enable #CloneDetect echo 7 -at * On join clone scanning Enabled. Users will now be scanned for clones when they join } } elseif ($1 == off) { if ($group(#CloneDetect) == off) Echo 4 -at Clone Scanning on join is already disabled else { .disable #CloneDetect echo 7 -at * On join clone scanning Disabled. Users will no longer be scanned for clones when they join } } elseif ($active !ischan) echo 4 -a ERROR: You need to scan in a channel else { who $chan var %nicks = $nick($chan,0), %x = 0 while (%x <= %nicks) { var %host = $address($nick($chan,%x),2) if (%host != $address($me,2)) && (!$read(allowedhost.txt,w,%host)) { if ($ialchan(%host,$chan,0) > 1) && (!$istok(%clone.hosts,%host,44)) { var %y = 1, %clones = $ialchan(%host,$chan,0), %clones.found = yes while (%y <= %clones) { var %nick = $gettok($ialchan(%host,$chan,%y),1,33) var %clone.nicks = $iif(%clone.nicks,%clone.nicks &) 4 %nick inc %y } echo 10 -a [Clones Detected] %clone.nicks @ $gettok(%host,2,64) var %clone.hosts = $addtok(%clone.hosts,%host,44) unset %clone.nicks } } inc %x } if (!%clones.found) echo 10 -a No clones found } } Edited February 27, 2012 by Henry
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now