mIRC Home    About    Download    Register    News    Help

Print Thread
#161927 12/10/06 02:05 PM
Joined: Jun 2006
Posts: 79
B
Babel fish
OP Offline
Babel fish
B
Joined: Jun 2006
Posts: 79
Code:
   if ($signal == d) { 
    if ($2 ison $1) { 
      .hinc -u15m d y  
      if ($hget(d,y) > 27) { 
        .hinc -u5m d x
        if ($hget(d,x) < 22) { !.quote -qmcH kick $1 $2 $3 %logo }
      }
      .hadd -u10m o $+($2,*@*faked*)
      .timer_ 1 4 !mode $chan $1 $+(+,$str(b,$hget(o,*).item)) $hget(o,1).item $hget(o,2).item $hget(o,3).item $hget(o,4).item $hget(o,5).item $hget(o,6).item $hget(o,7).item $hget(o,8).item $hget(o,9).item $hget(o,10).item $hget(o,11).item $hget(o,12).item 
    } 
  }


I use this technique.

If clones/flooder flood the chan within 15 secs (means nonstop flood in 15secs) .. then i will kick after 27 clones with 21 kicks. I hope someone will give me a better ideas/codes. Thanks

#161928 12/10/06 03:15 PM
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
the if statement that does the kicking doesn't trigger when you want it to. a lot of people think X times in Y seconds means //inc -uY %a | if (%a >= X) when in fact that's not technically right, since if %a happened to be increased at certain times (ie just before -u caused the variable to unset), %a could hold the value X in up to (X-1)*Y seconds. when i want to check X times in Y seconds, i go for: inc -z %a Y | if (%a > $calc(Y*(X-1))) which should, if you think about it, be a lot more accurate than the particular -u method you used

-u could be used just not in that way, eg X times in Y seconds could also be detected, unless i'm mistaken, by something similar to: hinc -muY name item | if ($hget(name,0).item >= X) since items of the same name are overwritten, that format is useful when checking, for example, X joins from different hosts in Y seconds where the item would be each host

the hinc on the following line looks out of place, can't make sense of it ;S it seems you want those kicks to happen after the if statement has been entered over 22 times in 5 seconds (which as mentioned earlier has been checked inaccurately). it really does look out of place given the nature of the code

!.quote -qmcH ? :X those swiches do nothing, and in fact are sent as a command to the server (/-qmcH). you don't even need the quote command, if you're paranoid about kick aliases being made just use: !kick $1- %logo

i dont see the logic in this combination of hadd/mode, like how it follows from the rest of the code. the whole thing you've pasted here looks like it was pieced together from something ;x where does *faked* come from? will that mask match whichever clones you're trying to keep out? why wait 4 seconds?

sorry i dont usually list errors in code/logic like this, not even sure you'll understand most of it ;p


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Link Copied to Clipboard