mIRC Home    About    Download    Register    News    Help

Print Thread
#113106 01/03/05 07:50 AM
Joined: Feb 2003
Posts: 106
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 106
There are many clone detector scripts available on the web, but they have too many embellishments for me to get to the core of how to write one on my own.

Would someone point me to a source simple enough that i might understand it? I would prefer that i could run it as an alias and not as a remote.

'Sometimes God puts us in the dark coz he is a crap designer.'


-
Just because it never happened doesn't mean it isn't true.
#113107 01/03/05 10:02 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Usage: /clones <nick>
Example: /clones Andy1

I'm sure this can be broken down to a simpler form but it's pretty straight forward. Hope this helps buddy. smile

Code:
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) &gt;= 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
    }
  }
}

#113108 01/03/05 05:11 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
The one here at nomorepasting works well also.


I refuse to engage in a battle of wits with an unarmed person. wink
#113109 01/03/05 09:40 PM
Joined: Feb 2003
Posts: 106
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 106
Thanks!
I shall study it when my headache goes LOL


-
Just because it never happened doesn't mean it isn't true.
#113110 01/03/05 09:42 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Sober up there buddy! grin


Link Copied to Clipboard