Simple Flood protection: ive seen this wanted in the forums so heres a very simple flood protection
all you need to do is replace #YOURCHANNEL with your channel and then when someone floods 5 lines in 5 seconds it will kick them
This Works for me ( there may be parts of the script that you dont need ( as i dont know alot about Hash Tables =S ))
on *:start: {
;makes a hash table with 150 slots when u start ur mIRC
hmake flood 150
}
on *:text:*:#YOURCHANNEL: {
if ($me isop $chan) {
;checks if im op
hinc -u5 flood $nick 1
;this increases the value of amount of texts that user that used
;the -u5 will unset that count after 5 seconds
if ($hget(flood,$nick) > 5) {
;checks if the user has typed 5 lines
ban -u300 $chan $nick
;bans them the -u300 means it will unban after 300 seconds ( 5mins )
kick $chan $nick 5 min Ban For Flooding!
;kicks the user
hdel flood $nick
;unsets the users counts
}
}
}
Ok, I know this one was done some time ago but I thought I\'d have a look at it since there are some recent anti-flood snippets come in. #Yourchannel could easily be left as # since it operates in channels where the user is an op, and the line:
if ($me isop $chan)
is not necessary if the text line is given as:
on @*:text:*:#:
Otherwise, I like it, even if i am looking at it 2 years after it was first added.