Jump to content
Countdown To Christmas!



Henry

Clone Detection settings Clone Detection settings

Recommended Posts

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 by Henry

Share this post


Link to post
Share on other sites
 
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
  • Create New...