Not to be shooting down balloons, but 'X violations in Y seconds' is a very bad approach to flood protection. Caps, color codes, etc are minor annoyances and can't be considered a flood. There's an amazing tutorial by myndzi that explains it quite well: http://jsfiddle.net/SReject/AAhpb/embedded/result/ (Mirrored; original posted to mircscripts.org no longer accessible)
More Friendly URL: http://devian.gr/Misc/CFDP.html