Fix for flooding rc server when joining too many channels

Please see my attempt at a fix for the issue I caused the other day.
Please note I haven't tested this code and I don't use python often!
I recommend you give it a check and test before pulling :)