We've recently been having problems with people doing this kind of thing on our servers.("xxx connected." over and over again)
It bans(IP) anybody for 5 minutes that tries to connect 3 times within 20 seconds.
Thanks To:
Taner
www.xkafe.net - For his help and idea.
Tsunami on IRC.
Note: Go easy on me. This one of my first pieces. If you see anything wrong/that can be improved, please don't hesitate to point it out. I'm sure that I've coded in a pretty ugly way.
Tested on TF2, don't see any reason for it not to work on other mods.