mIRC Homepage
Posted By: Crosz Clone detect and announce? - 03/03/05 03:17 PM
OK i would love to add a clone detector to my bot so it announce the clones if someone enters with more than 2 connections but i dont want it to kick or ban just detect and announce to the main channel. I dont have a clue where to start with this. Can someone please help.
Posted By: Armada Re: Clone detect and announce? - 03/03/05 03:19 PM
Code:
 
on @!*:join:#: {
  var %host_to_search_for = $address($nick,2)
  var %number_from_that_host = $ialchan(%host_to_search_for,$chan,0)
  if (%number_from_that_host > 1) {
    ;we have clones!
    ;first set up our vars and loop
    var %count = 0
    unset %clones
    :loop
    inc %count
    ;loop through every nick, adding the nicks to %clones
    var %clones = %clones $ialchan(%host_to_search_for,$chan,%count).nick
    if (%count < %number_from_that_host) { goto loop }
    msg $chan (Clones) %count clones from $address($nick,2) %clones
  }
}
 
Posted By: Crosz Re: Clone detect and announce? - 03/03/05 03:20 PM
ok that was mega fast lol
Posted By: SladeKraven Re: Clone detect and announce? - 03/03/05 03:25 PM
Hi Crosz,

Code:
On @*:Join:#: {
  if ($ial == $false) { 
    .ial on
  }
  if ($chan($chan).ial == $false) { 
    who $chan
  }
  var %x = $ialchan($address($nick,2),$chan,0), %clones
  if ($ialchan($address($nick,2),$chan,%x) >= 2) {
    while (%x) {
      var %clones = $addtok(%clones,$ialchan($address($nick,2),$chan,%x).nick,32) 
      dec %x
    }
    echo $chan $numtok(%clones,32) matches found: %clones
  }
}
Posted By: SladeKraven Re: Clone detect and announce? - 03/03/05 03:25 PM
Woops, Armada beat me to it. grin
Posted By: Armada Re: Clone detect and announce? - 03/03/05 08:05 PM
If you are just joining the channel tho you might want to who the room to make sure the ial is up to date, I use that script but I have it echo to my window I just change the echo to msg
Posted By: xolademoness Re: Clone detect and announce? - 08/04/05 02:09 AM
Quote:
If you are just joining the channel tho you might want to who the room to make sure the ial is up to date
What do you mean? Does that mean it might not work sometimes if you're just joining the room? Do you, or anyone else know how that could be fixed if this in fact the case?

This is the version I am using, pretty much the same but like yours echoes it instead of saying it to the channel..:
Code:
on @!*:join:#: {
  var %host_to_search_for = $address($nick,2)
  var %number_from_that_host = $ialchan(%host_to_search_for,$chan,0)
  if (%number_from_that_host > 1) {
    ;we have clones!
    ;first set up our vars and loop
    var %count = 0
    unset %clones
    :loop
    inc %count
    ;loop through every nick, adding the nicks to %clones
    var %clones = %clones $ialchan(%host_to_search_for,$chan,%count).nick
    if (%count < %number_from_that_host) { goto loop }
    echo -a 0,02 $time 0,012 ECHO:5 (clones) %count clones from IP3 $address
($nick,2) 5-3 %clones
  }
}
© mIRC Discussion Forums