V1.0
Alt + r ---> Paste Snippet.
Type /scan in an active channel, and though there may be a bit of lag on larger channels (300+) it should tell you all the users of multiple IRC clients on that channel.
SYNTAX:
/scan [-k]
-k: Kicks and bans found clones from channel.
V1.1
There's no longer any lag in the scanner.
alias scan {
echo -at 15,1[12S14can15]
%clone = $false
%h = 1
%clone.f = 0
If ($hget(t)) { hfree t }
If ($hget(m)) { hfree m }
hmake t
hmake m
While ($nick($active,%h)) {
hadd t $nick($active,%h) $nick($active,%h)
hadd m $nick($active,%h) $nick($active,%h)
inc %h
}
%y = 1
While (%y <= $hget(t,0).item) {
%i = 1
While (%i <= $hget(m,0).item) {
If ($address($hget(m,%i).data,2) == $address($hget(t,%y).data,2)) && ($v1 $v2 != $null $null) {
If ($hget(m,%i).data != $hget(t,%y).data) && (!$istok(%clones,$hget(t,%y).data,32)) {
%clone = $true
%clones = $addtok(%clones,$hget(m,%i).data,32)
inc %clone.f
echo -at 15[12,1C14lone 12 $+ $chr(35) $+ 14 $+ %clone.f $+ 15: $scand($hget(m,%i).data,$hget(t,%y).data)
If ($1 = -k) {
If $nick($active,$me,oh) && ($hget(m,%i).data ison $active) { ban -k $chan $hget(m,%i).data 2 15,1[12N14o 12C14lones.15] }
else { echo -a $+ $color(info).dd $+ ,01ERROR * /scan: You are not an op/halfop on $active }
}
}
}
inc %i
}
inc %y
}
If (%clone = $false) { echo -at 15,1[12N14o 12C14lone(s) 12F14ound.15] }
If (%clone = $true) { echo -at 15,1[12 $+ %clone.f $+ C14lone(s) 12F14ound.15] }
echo -at 15,1[12/14Scan15]
unset %clone.f %clone %i %y
hfree t
hfree m
}
alias scand return 15,1[12C14lone 12D14etected: 12 $+ $left($2,1) $+ 14 $+ $right($2,$calc($len($2) - 1)) 12I14s 12 $+ $left($1,1) $+ 14 $+ $right($1,$calc($len($1) - 1)) $+ 15]