mIRC Home    About    Download    Register    News    Help

Print Thread
#142101 15/02/06 11:42 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
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 smirk

Code:
 
#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
#142102 16/02/06 08:25 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
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.

Code:
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.

#142103 16/02/06 12:15 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
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 smirk

Last edited by raZOR; 16/02/06 12:16 PM.

IceCapped
#142104 16/02/06 12:21 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
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.

#142105 16/02/06 12:46 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
still doesnt work smirk


IceCapped
#142106 16/02/06 12:54 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
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.

#142107 16/02/06 01:01 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
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 smirk
its like mirc ignores alias

i got mirc installer from mirc page...

so this is weird


IceCapped
#142108 16/02/06 01:04 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
How are you using the alias now?

#142109 16/02/06 01:06 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
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
#142110 16/02/06 01:07 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
You have to use //echo -a $clones(#channel,nickname)

#142111 16/02/06 01:14 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
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 smirk

Last edited by raZOR; 16/02/06 01:14 PM.

IceCapped
#142112 16/02/06 02:08 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
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>

Code:
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.
}

#142113 16/02/06 02:10 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
very very very much thanks !!!!!!!


IceCapped

Link Copied to Clipboard