Cleanup tx handling and register stdin reader from outside irc.