Flood/Spam Protection
Posted by HellRaz0r
Saturday, September 09, 2006
Description: Very simple flood protection, can be used in many applications :)
on *^:TEXT:*:#YourChannel:{
var %secs = 3, %lines = 5, %bantime = $duration(5mins)
var %htable = $+($chan,_,$wildsite)
hinc -mu $+ %secs %htable count
if ($hget(%htable,count) >= %lines) {
ban -u $+ %bantime $chan $wildsite
kick $chan $nick Detected %lines in %secs secs, banned for $duration(%bantime)
.hdel -sw %htable count
}
}