alias clones {
[color:blue]
/*
[color:green]
Will only perform clone search if on a channel.
[/color]
*/
[/color]
if ($active ischan) {
[color:blue]
/*
[color:green]
If the Internal Address List is $false, switch it on.
[/color]
*/
[/color]
if ($ial == $false) { .ial on }
[color:blue]
/*
[color:green]
if $chan($chan).ial returns $true if Internal Address List contains addresses of all users on this channel.
In this case we're checking if it's not $true.
[/color]
*/
[/color]
if ($chan($chan).ial == $false) { who $chan }
[color:blue]
/*
[color:green]
Here we find out how many users are using the $$1's address in *!*@host format and store it into the %x var.
we also know we're going to store our nicknames into the %clones var.
[/color]
*/
[/color]
var %x = $ialchan($address($$1,2),$chan,0), %clones
[color:blue]
/*
[color:green]
Here we check to see how, if the result from %x is greater than or equal to 2, you may change 2 to anything you
want to.
[/color]
*/
[/color]
if ($ialchan($address($$1,2),$chan,%x) >= 2) {
[color:blue]
/*
[color:green]
We've found out that there is 2 or more users using the *!*@host format.
We then store them into %clones var and print something like
Andy1 Andy2 Andy3 Andy4 Andy5 and so on...
[/color]
*/
[/color]
while (%x) {
var %clones = $addtok(%clones,$ialchan($address($$1,2),$chan,%x).nick,32)
dec %x
}
[color:blue]
/*
[color:green]
Here we echo our results in the style of..
5 matches found: Andy1 Andy2 Andy3 Andy4 Andy5
[/color]
*/
[/color]
echo 4 -a $numtok(%clones,32) matches found: %clones
}
}
}