|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
can some one PLEASE modify this to scan for clones ? i mean, nothing much is needed, it basically should open @window and show result, only problem is for me that i dont know what code must go to compare same hosts... so im stuck
#Clone.Scan off
raw 352:*: {
if ($left($7,1) == G) { %temp.nuser.away = [Away] }
else { unset %temp.nuser.away }
inc %Varnk.Total
aline @CloneScan $str($chr(160),3) %Varnk.Total $+ . $+ $chr(9) $+ $6 $+ $chr(9) $+ $+($3@,$4) %temp.nuser.away | halt
}
raw 315:*: {
if (%Varnk.Total == 0) { aline @CloneScan $str($chr(160),3) No clones found. | goto end }
aline @CloneScan $chr(160)
aline @CloneScan $chr(160)
aline @CloneScan $str($chr(160),3) Total: %Varnk.Total clones found !
:end
.unset %varnk.total
.disable #Clone.Scan | halt
}
#Clone.Scan end
menu @CloneScan {
dclick {
if ($sline(@CloneScan,1).ln == 1) { /window -c @CloneScan | halt }
}
$iif($sline($active,1),$style(2)) $+ Query User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | /query %unik
$iif($sline($active,1),$style(2)) $+ Whois User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | /whois %unik %unik
$iif($sline($active,1),$style(2)) $+ DNS User: tokenize 9 $strip($$sline($active,1)) | /set %unik $gettok($1-,3,32) | /dns %unik
-
Save Log: /savebuf 1-200 @CloneScan $mircdirlogs\Misc\CloneScan $+ . $+ $network $+ .Log
-
Close:/window -c @CloneScan
}
alias clone.scan {
if ($network == $null) { set %ntw $server }
else { set %ntw $network }
if ($1 == $null) { halt }
if ($1 == -c) {
if ($window(@CloneScan) != $null) { .window -c @CloneScan }
window -lk -t4,15 +s @CloneScan 220 50 320 290 @CloneScan Verdana 11
aline @HostScan $chr(160)
aline @HostScan $chr(160)
aline @HostScan $str($chr(160),1) 10 %script %version Clone Scanner
aline @HostScan $str($chr(160),2) Clones On $chan $+ :
aline @HostScan $chr(160)
aline @HostScan $chr(160)
set %Varh.Total 0 | .enable #Clone.Scan | .raw who $chan
}
}
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
Instead of modifying the script for you I'm going to give you an identifier that returns the clones for a given nickname on a given channel. alias clones {
if (!$chan($1).ial) updatenl
var %clones, %i = 1
while ($ialchan($address($2,2),$1,%i).nick) {
if ($v1 != $2) || ($prop == ionick) %clones = %clones $ialchan($address($2,2),$1,%i).nick
inc %i
}
return %clones
} //echo -a $clones(#channel,nickname) //echo -a $clones(#channel,nickname).ionick - the .ionick property will return the nick you scanned in the list returned.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
well i just did this: alias clones { /who $chan if (!$chan($1).ial) updatenl var %clones, %i = 1 while ($ialchan($address($2,2),$1,%i).nick) { if ($v1 != $2) || ($prop == ionick) %clones = %clones $ialchan($address($2,2),$1,%i).nick inc %i } return %clones } raw 352:*: { //echo -a $clones(#channel,nickname) //echo -a $clones(#channel,nickname).ionick } and nothing happens, it only floods me out
Last edited by raZOR; 16/02/06 12:16 PM.
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
That will create an infinite loop.
$clones does a /who $chan, in the /who reply you call $clones, so $clones does a /who $chan, etc etc.
$clones can be used as is, even by the command line. You don't need to /who the channel and you shouldn't add that at the start of the alias.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
still doesnt work
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
This is strange. It works perfectly for me. Make sure you're using 6.16 and also make sure that the nickname you're testing it on has another nickname with the same hostname.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
used on CLEAN 6.16 joined channel with 2 of my clones, nothing happened joined a channel with 200+ users, nothing happened then used debug to see if something runs at all... nothing runs its like mirc ignores alias i got mirc installer from mirc page... so this is weird
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
How are you using the alias now?
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
i just join channel and type /clones :P since you said /who $chan is un-necessary
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
You have to use //echo -a $clones(#channel,nickname)
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
well when i type it (by hand) since dunno where to put it :X i got "echo insufficient parameters" (for both) or im too stupid to use it
Last edited by raZOR; 16/02/06 01:14 PM.
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
(For people that think this post makes no sense since he didn't get it working, we spoke on IRC...) This is a clone scanner for the entire channel, just type /clonescan <channel> alias clones {
if (!$chan($1).ial) updatenl
var %clones, %i = 1
while ($ialchan($address($2,2),$1,%i).nick) {
if ($v1 != $2) || ($prop == ionick) %clones = %clones $ialchan($address($2,2),$1,%i).nick
inc %i
}
return %clones
}
alias clonescan {
if ($1 == $null) tokenize 32 $chan
var %clones, %clonesdone, %i = 1
echo $color(info) -abfilrt * Scanning for clones...
while ($nick($1,%i)) {
if (!$istok(%clonesdone,$v1,32)) {
%clones = $clones($1,$nick($1,%i))
if (%clones != $null) {
%clonesdone = $addtok(%clonesdone,%clones,32)
echo $color(info) -abfilrt * Clones for $nick($1,%i) $+ : %clones ( $+ $address($nick($1,%i),2) $+ )
}
}
inc %i
}
echo $color(info) -abfilrt * End of scan.
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
very very very much thanks !!!!!!!
IceCapped
|
|
|
|
|