mIRC Home    About    Download    Register    News    Help

Print Thread
#160935 01/10/06 10:27 PM
Joined: Jan 2006
Posts: 40
D
DjJax Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2006
Posts: 40
first test

alias channels {
set %loop 1
:loop
//echo -a $ialchan($address($nick(#,%loop),2),#,%loop)
inc %loop
if %loop > $ialchan($address($nick(#,%loop),#,0) { halt }
goto loop
}

this is the second try

[n90]

alias clones { .who # | clonex }

raw 352:*: {
set %can 6
}

alias clonex {
set %loop 1
:loop
//echo -a $ialchan($address($6,2),%can,%loop)
inc %loop
if %loop > 10 { halt }
goto loop
}

i need a chanel clone detect , any help please

thnx

#160936 02/10/06 03:43 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
well here is my own brew of a clone scanner and yes it might repeat the names because it searches for all host and checks them for clones so if a check as been made earlier and found a clone later where the clone was it will again say its a clone of whatever im sure the code could be adjusted a bit here she is

Code:
alias clonescan {
  var %x = 1
  while (%x <= $nick($active,0)) {
    if (!$address($nick($active,%x),4)) { inc %x | goto END }
    elseif ($ial($address($nick($active,%x),4),0).host > 1) {
      if ($ial($address($nick($active,%x),4),0).host == 2) {
        echo -a $ial($address($nick($active,%x),4),1).nick is clone of $ial($address($nick($active,%x),4),2).nick
      }
      elseif ($ial($address($nick($active,%x),4),0).host == 3) {
        echo -a $ial($address($nick($active,%x),4),1).nick is clone of $ial($address($nick($active,%x),4),2).nick and $ial($address($nick($active,%x),4),3).nick
      }
    }
    else { inc %x }
    inc %x
    :END
  }
}


000000000000000000000
Edited #channame with $active , $active being the window you perform the command in

you can also create an alias for the ial stuff to make it shorter...


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#160937 02/10/06 09:39 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Is it just me, or doesn't it do anything?
I copied and pasted your code, and typed /clonescan

Nothing happened?

#160938 02/10/06 11:45 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
It should

ChanServ is clone of FreedomRules and Jared
geem is clone of Phatt_One and snow[a]
geem is clone of Phatt_One and snow[a]
geem is clone of Phatt_One and snow[a]
Elder is clone of FC970
fryz is clone of HttpStats and Kopete
fryz is clone of HttpStats and Kopete

i've noticved that some mIRC clients even though same version depending scripts it has hard time using $address(nick,4) it will return null sometimes otherwise it works this is why I did a null check to start the script.

here it is again never know if i missed a bracket while editing live on here.

Code:
alias clonescan {
  var %x = 1
  while (%x <= $nick($active,0)) {
    if (!$address($nick($active,%x),4)) { inc %x | goto END }
    elseif ($ial($address($nick($active,%x),4),0).host > 1) {
      if ($ial($address($nick($active,%x),4),0).host == 2) {
        echo -a $ial($address($nick($active,%x),4),1).nick is clone of $ial($address($nick($active,%x),4),2).nick
      }
      elseif ($ial($address($nick($active,%x),4),0).host == 3) {
        echo -a $ial($address($nick($active,%x),4),1).nick is clone of $ial($address($nick($active,%x),4),2).nick and $ial($address($nick($active,%x),4),3).nick
      }
    }
    else { inc %x }
    inc %x
    :END
  }
}


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#160939 03/10/06 05:48 AM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Alright, I think most users on the channel I tried it on, use a hidden hostmask. Perhaps that's the problem in my case.

Thx in any case.

#160940 03/10/06 07:44 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
try a test real quick type //echo -a $ial(*!*@*.com,0) if it returns something larger then 0 then you still have a fighting chance :P


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#160941 04/10/06 07:00 AM
Joined: May 2006
Posts: 122
J
Vogon poet
Offline
Vogon poet
J
Joined: May 2006
Posts: 122
Thats probably because the address isn't stored in the IAL (Internal Address List). See when you join a channel you only get a list of names, no addresses. When a user joins or talks in the channel there address is stored in the IAL. Anyway here is a clonescanner I wrote a while back, it automatically updates the IAL.
Code:
#############################################
#                                           #
#      Clone scanner by jizzy@AustNet       #
#                                           #
#       Usage: /clonescan [#channel]        #
#                                           #
#############################################

alias clonescan {
  var %# = $iif($1,#$1,$chan))
  dialog $iif($dialog(clones),-v,-m) clones clones
  did -r clones 1,2
  if (!%#) did -a clones 2 You must specify a channel
  elseif (!$server) did -a clones 2 Not connected to server
  elseif ($me !ison %#) did -a clones 2 You are not on %#
  elseif (!$chan(%#).ial) {
    did -a clones 2 Updating IAL, please wait...
    .enable #updateial
    who %#
  }
  else {
    var %x = 1
    while ($nick(%#,%x)) {
      var %a = $address($v1,2)
      hadd -m clones %a $hget(clones,%a) $v1
      inc %x 1
    }
    var %n = 0, %h = 0
    while ($hget(clones,1).item) {
      var %v = $v1, %c
      if ($numtok($hget(clones,%v),32) > 1) {
        inc %n $v1
        var %x = 1
        while ($gettok($hget(clones,%v),%x,32)) {
          var %c = %c $v1 &
          inc %x 1
        }
        did -a clones 1 Host: $mid(%v,5) $crlf $+ Clones: $left(%c,-1) $crlf $crlf
        inc %h 1
      }
      hdel clones %v
    }
    hfree clones
    did -ar clones 2 %# - Found %n clones on %h host $+ $iif(%h != 1,s)
  }
}
#updateial off
raw *:*:{
  if ($numeric == 352) haltdef
  elseif ($numeric == 315) {
    if ($dialog(clones)) clonescan $2
    .disable #updateial
    haltdef
  }
}
#updateial end
dialog -l clones {
  title "Clones"
  size -1 -1 182 139
  option dbu
  edit "", 1, 3 5 175 120, read multi vsbar
  edit "", 2, 3 125 175 10, read
}
menu channel {
  Clone Scan:clonescan
}


If only women came with popup menus and online help.
#160942 05/10/06 09:01 AM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Thanks for that Jizzy.
I tried your code, and it indead returns the clones now.

Nice script btw, with dialog and all.

Thanks!


Link Copied to Clipboard