; -------------------------------------------------------------------------------------------------
; Protections - Sniplet i made for mIRC forums, but decided to keep (comments and all) heh
#protect.flood off
on @1:TEXT:*:#: {
; ----------------------------------- Flood (Repeated Messages)
; This is a simple protection that looks for a user repeating the
; same message, and if it finds that person, first will warn, then
; will set a mute ban, next kick, then ban
; ----------------------------------- Flood (Repeated Messages)
if (%text. [ $+ [ $nick ] ] != $1-) /set -u300 %text. [ $+ [ $nick ] ] $1-
else {
; Increase number of duplicate messages
/inc -u5 %flood. [ $+ [ $nick ] ]
;check how many times we've had to see that message
if (%flood. [ %+ [ %nick ] ] == 3) {
/unset %flood. [ $+ [ $nick ] ]
; increase number of times we've had to deal with this person
/inc -u1800 %warn. [ $+ [ $nick ] ]
; take action
/takeaction $chan $nick Flood Flooding (5 lines, 3 seconds)
}
}
}
#protect.flood end
#protect.spam off
on @1:TEXT:*:#: {
; ----------------------------------- Spam (Repeated Gibberish)
; This is also a simple protection, as it will find a person typing
; several lines, but with any line of text. This has the same actions
; as the flood protection, but is 7 lines in 5 seconds.
; ----------------------------------- Spam (Repeated Gibberish)
/inc -u5 %spam. [ $+ [ $nick ] ]
; they passed limit
if (%spam. [ $+ [ $nick ] ] == 7) {
/unset %spam. [ $+ [ $nick ] ]
; increase times dealt with
/inc -u1800 %warn. [ $+ [ $nick ] ]
; take action
/takeaction $chan $nick Spam Spamming (7 lines, 5 seconds)
}
}
#protect.spam end