Add upper limit for message transmission

Also fix that nasty buffer overflow in irc_message_to_string()