Clone scanner & Kicker (updated!)

By foobar on May 12, 2008

; ———————————————————————————————————————————————————————
; —— Clone scanner 1.8
; —— Author: foobar (Ken on irc.lucidchat.net)
; —— Usage: Scan and kick clones
; ————————————————————
; —— What it does:
; This snippet can either return, echo, or display clones from a channel.
; There is also the ability to kick clones; see below.
; ————————————————————
; —— Syntax: $clone(#) $clone(!@[,#])
; $clone(
!@[,#]) : returns all clones for address !@* (and on chan # if specified - # not required)
; $clone(#) : returns the results or $false
; ———————————————————————————————————————————————————————

-- Beta clone scanner for a script I am working on. :) Comments are nice ;P

; ———————————————————————————————————————————————————————
; —— Clone scanner 1.8
; —— Author: foobar (Ken on irc.lucidchat.net)
; —— Usage: Scan and kick clones
; ————————————————————
; —— What it does:
;   This snippet can either return, echo, or display clones from a channel.
;   There is also the ability to kick clones; see below.
; ————————————————————
; —— Syntax: $clone(#) $clone(*!*@*[,#])
;   $clone(*!*@*[,#]) : returns all clones for address *!*@* (and on chan # if specified - # not required)
;   $clone(#) : returns the results or $false
; ———————————————————————————————————————————————————————

alias clone { 
  var %error = echo -atc ctcp * /clone: 
  if ($wildtok($1,#*,1,32)) { 
    var %cchan = $gettok($1-,$findtok($1-,$v1,32),32)
    if (!$chan(%cchan)) { 
      %error Not a valid channel.
      halt
    }
    if (!$ialchan(*,%cchan,0)) who %cchan
    var %x = 1
    while ($nick(%cchan,%x)) { 
      var %cget = $address($v1,2)
      if ($ialchan(%cget,%cchan,0) > 1) && ($nick(%cchan,%x) !isin $read(clone.txt,1)) { 
        bwrite clone.txt -1 -1 $+($left($regsubex($str(~,$ialchan(%cget,%cchan,0)),/~/g,$+($ialchan(%cget,%cchan,\n).nick,$chr(32))),-1),$chr(40),%cget,$chr(41),$chr(44))
      }
      inc %x
    }
    bread clone.txt 0 $file(clone.txt).size &cdump
    if (!$bfind(&cdump,0,$chr(44))) { 
      if ($isid) return $false
      else %error No clones found
      return
    }
    .remove clone.txt
    return $left($replace($bvar(&cdump,1,$bvar(&cdump,0)).text,-,$chr(32)),-1)
  }
  if (*!*@* iswm $1) { 
    var %cchan = $iif($2 && $chan($2),$2,$active), %cget = $1
    if ($ialchan(%cget,%cchan,0) > 1) { 
      return $regsubex($str(~,$v1),/~/g,$+($ialchan(%cget,%cchan,\n).nick,$chr(32)))
    }
    else return $false
  }
  else return ERR_PARAMS
}

raw 352:*:haltdef
raw 315:*:haltdef
on me:*:join:who #
on *:join:#:{ 
  if ($clone($wildsite)) echo -atc CTCP * —› CLONES: $v1
}
on ^*:hotlink:CLONES*:#:$iif($me isop #,return,halt)
on *:hotlink:CLONES*:#:{ 
  var %cline = $gettok($hotline,$+($calc($gettok($hotlinepos,1,32) +1),-),32), %x = 1
  while ($gettok(%cline,%x,32)) { 
    if ($me != $v1) kick # $v2
    inc %x
  }
}

menu channel { 
  -
  Clone scanner:echo -a $clone(#)
}

Comments

Sign in to comment.
foobar   -  May 12, 2008

Alright! Many updates :)

1) juhapuha, I tried a new method for dumping the clones into a database.. hope this solves your problem. If not, I\'ll do my best yet again to make a suitable clone scanner for your needs.

2) EL, join event added. In fact, I updated it so that, on a channel join, it will echo \"CLONES: \" if the user has any. Double click on \"CLONES:\" and all clones are kicked.

3) $clone(!@*[,#]) has been added! You can check out clones from an address and for different channels! :)

Example? Sure:

$clone(!@lol-123ASF-NETWORK.res.rr.com,#mIRC) results in: nick <clones for nick on channel #mIRC>

~ More updates to come! This was just, again sigh, another bit of impatience and haste to release the second version. :P

 Respond  
EL   -  May 12, 2008

@ foobar ,np.

@ juhapuha, * /set: line too long (line 34, script5) - There was 100 users on channel and 70 clones., wtfN why are there 70 damn clones on your network? ROFL hell of a way to get stats up on search IRC i suppose :P

 Respond  
foobar   -  May 12, 2008

Nope, you have some fixing on the script :)

  • /set: line too long (line 34, script5) - There was 100 users on channel and 70 clones.
    I am well aware of /set\'s limit. Just my impatiently releasing a beta. 9_9 I\'ll use hash tables or so soon.

Suggestions maybe add a on join event to trigger the scann an to auto kick cones been done sure but it would be nice to add.`-.-´
Thanks for your the idea, that\'ll be included when I get the time to update this.

 Respond  
EL   -  May 12, 2008

What dude works fine and its very good love the hotlink @ window comb very neat.As for clone scanners they are hardly needed most server/network(s) limit connections from the same ip so clones really aren\'t an issue and host clone scanners are extremely inefficient not haveing status nuff to see the ip of people makes well coded scanners like this almost useless cause your scanning hosts,some people look at indents as well depends where you are i have a full ip scanner for my bot i made awhile back shes admin an i only used it for maybe a week or two an never used it again but they are useful in certain situations.Very nice coding foobar,small code nice little perks.Suggestions maybe add a on join event to trigger the scann an to auto kick cones been done sure but it would be nice to add.`-.-´

 Respond  
juhapuha   -  May 12, 2008

Nope, you have some fixing on the script :)

  • /set: line too long (line 34, script5) - There was 100 users on channel and 70 clones.
 Respond  
juhapuha   -  May 12, 2008

Haha :--) my next clonescanner will be good too. :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.