Simple flood protection

By Yoinx on Dec 08, 2004

Since a lot of people request these two flood protections in the forum. I figured they should be posted. Might already be in here somewhere a few pages back but, oh well.

on *:start: { 
  ;if user sends more than %flood.lines in this time ban them 
  set %flood.unset 3
  ;if a user sends more than this many lines/actions in %flood.unset ban them 
  set %flood.lines 5 
  ;this is the bantime in seconds 
  set %flood.bantime 600
} 
ON @*:TEXT:*:#: { 
  if ($nick !isop $chan) { 
    inc $($+(-u,%flood.unset)) $+(%,flood.,$chan,.,text.,$nick) 
    if ($($+(%,flood.,$chan,.,text.,$nick),2) >= %flood.lines) { 
      ban $($+(-ku,%flood.bantime)) $chan $nick 3 Don't flood 
    } 
  } 
} 
ON @*:ACTION:*:#: { 
  if ($nick !isop $chan) { 
    inc $($+(-u,%flood.unset)) $+(%,flood.,$chan,.,action.,$nick) 
    if ($($+(%,flood.,$chan,.,action.,$nick),2) >= %flood.lines) { 
      ban $($+(-ku,%flood.bantime)) $chan $nick 3 Don't flood 
    } 
  } 
} 

Comments

Sign in to comment.
Anti   -  Jul 06, 2007

Four
Thumbs
Up
!
Nice
Job
This
Will
Go
On
My
Protection
Bot
AKA
Anyti

(Do i even have four thumbs?)

 Respond  
XpLoiTeR   -  Jan 13, 2006

Thanks Yoinx For Illustrating :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.