No faults? I would consider the part where your code only works against a single-nick flood a major fault in a flood protection script. If someone loads a few dozen floodbots that each start flooding you your code doesn't stand a chance, as it won't do. It will nicely close each 5th message window, allowing all the other bots to flood you into oblivion.
Then a minor fault being the pointless if statements, which take time and slow down the effectiveness of the code.