This PR is really more of a stopgap until @zinsserzh implements what he's planning in this issue, but I was butting up against some of the very limitations he was talking about and decided to roll out a patch to address them in the short term. Specifically:
As suggested, makes AioConnection.connect a coroutine, which allows for reconnecting after loop.run_forever has been called. Since overwriting the AioSimpleIRCClient.connect function to call loop.run_until_complete was pretty easy, this change was actually minimally disruptive
Adds a AioConnection.disconnect call to the IrcProtocol in the connection_lost function
Cleans up the various print functions I stupidly left in last time
This PR is really more of a stopgap until @zinsserzh implements what he's planning in this issue, but I was butting up against some of the very limitations he was talking about and decided to roll out a patch to address them in the short term. Specifically:
AioConnection.connect
a coroutine, which allows for reconnecting afterloop.run_forever
has been called. Since overwriting theAioSimpleIRCClient.connect
function to callloop.run_until_complete
was pretty easy, this change was actually minimally disruptiveAioConnection.disconnect
call to the IrcProtocol in theconnection_lost
functionprint
functions I stupidly left in last time