mIRC Home    About    Download    Register    News    Help

Print Thread
#155942 10/08/06 12:55 PM
Joined: Jun 2004
Posts: 25
Q
Quia Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Jun 2004
Posts: 25
I've been working on a bunch of anti-spammer/clone flooding scripts, my latest being this rather simple but fairly effective script.
Code:
  
.Mass kick: {
  set %knum $snick(#,0)
  :start
  k $snick(#,%knum)
  if (%knum > 1) { dec %knum | goto start 
    else halt 
  }
}


While it works well in small situations, anything in the 50+ clones range gets really, really slow on my end.. generally because I'm being attacked by 50 clones. :tongue: I was thinking of speeding it up through using an akick, going through the list of names in the channel, going through them in the same manner as the kickscript, only with $nick(#,0), comparing against $snicks to see if the name is one of those to be kicked, saving the adresses of the unselected nicks in one spot and the selected nicks in another...

This is where I start not knowing how I'd do this. The only thing I can think of is a long long list of comparisons with various $address and if iswm. How would you derive, out of those lists of adresses, a mask that would effect all the selected nicks(provided one existed. If it doesn't, i don't even want to think about the code required to get two or three matching masks..) without effecting any of the unselected names.

Is this just a crazy crackpot idea of mine that will forever sit unimplemented, or is it actually possible? If so.. how? confused

Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
To get just the unique addresses of the selected nicks, you could do something like this:

Code:
alias example {
  var %i = 1 , %chan = $iif($1,$1,$iif($active ischan,$active)) , %w = @saddresses
  window -hes %w | clear %w
  while ($snick(%chan,%i)) {
    aline -n %w $address($v1,2)
    inc %i
  }
  window -aw3 %w
}


This assumes that you have /who'ed the channel upon join, to fill the $ial. If you're not already /who'ing the channel upon join, a simple: on *:join:#:{ who $chan } will suffice.

Joined: Jun 2004
Posts: 25
Q
Quia Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Jun 2004
Posts: 25
If I'm reading your code right, it would be a lot easier to do that with a popup rather than an alias(one line added to my current mass kick would do about the same thing. mode # +b $address($snick(#,%knum),2) or something of the like..) so I'm not quite sure if I'll be able to use any of the code in my script.. but thanks anyways..

Joined: Mar 2004
Posts: 210
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Mar 2004
Posts: 210
How about a clone detector and an autokick on 3 or more clones?


Link Copied to Clipboard