New I/O code for IRC connection, begin to adapt API for it