Python 3 fixes for ircutils