mIRC Home    About    Download    Register    News    Help

Print Thread
#113308 03/03/05 03:17 PM
Joined: Aug 2004
Posts: 43
C
Crosz Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Aug 2004
Posts: 43
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.

Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
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
  }
}
 

Joined: Aug 2004
Posts: 43
C
Crosz Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Aug 2004
Posts: 43
ok that was mega fast lol

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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
  }
}

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Woops, Armada beat me to it. grin

Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
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

Joined: Feb 2005
Posts: 40
Ameglian cow
Offline
Ameglian cow
Joined: Feb 2005
Posts: 40
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
  }
}


Link Copied to Clipboard