Ok, it's your choice. I just wanted an autokick function and after working on it, I thought sharing it it's the next best thing. It's a source patch, so anyone can inspect it.
Here's an improved version, it won't add bots (according to pb_minbots) unless a human player joins a team:
http://www.sendspace.com/file/5z5f2j