mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2009
Posts: 1
X
Xen0 Offline OP
Mostly harmless
OP Offline
Mostly harmless
X
Joined: Jan 2009
Posts: 1
Now currently I got a generic anti-flood script to work...

But I want to modify it to include a detection of the same line from any user being entered, no matter of time interval. Problem is, I'm pretty new to scripting, so I figured I'd ask here for help since I don't know what I'd put. frown

Here's what I got on my anti-flood script so far. I'd like to achieve the same end result, except for duplicate lines no matter how far apart they are...How would I add a check for that?

Code:
; Kicks on flooding any 3 lines in 2 seconds.
on @*:TEXT:*:#:{
  inc -u2 %flood. [ $+ [ $nick ] ]
  if (%flood. [ $+ [ $nick ] ] == 3) {
    ban -ku600 $chan $nick 3 Tell ya what... Stop floodin. Take a timeout for 10 minutes!
    halt
  }
}

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
My bad. I overlooked a serious matter, but here is the one I found for you that might just be what you want:

The script below is written by someone else, and I hope this offers some help.

Code:
on ^*:text:*:*: {
  if ($readini(logs.ini,$nick,last) == $1-) {
    if ($readini(logs.ini,$nick,warns) == $null) {
      writeini -n logs.ini $nick warns 0
    }
    writeini -n logs.ini $nick warns $calc($readini(logs.ini,$nick,warns) + 1)
    if ($readini(logs.ini,$nick,warns) >= 3) {
      if ($readini(logs.ini,$nick,warns) == 3) {
        .echo -mt Halted text from: $nick for repetitive text.
        ban -ku600 $chan $nick 3 Tell ya what... Stop floodin. Take a timeout for 10 minutes!
      }
      haltdef
    } 
  }
  if ($readini(logs.ini,$nick,last) != $1-) {
    writeini -n logs.ini $nick warns 0
  }
  writeini -n logs.ini $nick last $1-
}

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Code:
on @*:TEXT:*:#:{
  inc -u2 %flood. [ $+ [ $nick ] ]
  if ($1-3 == %fld. [ $+ [ $nick ] ]) { inc -u60 %rpt. [ $+ [ $nick ] ] }
  if (%flood. [ $+ [ $nick ] ] == 3) || (%rpt. [ $+ [ $nick ] ] == 3) {
    ban -ku600 $chan $nick 3 Tell ya what... Stop floodin. Take a timeout for 10 minutes!
    halt
  }
  set -u60 %fld. [ $+ [ $nick ] ] $1-3
}



If they type the same thing within 60 seconds they will get kicked.


Link Copied to Clipboard