archangelic / pinhook

the pluggable python framework for IRC bots and Twitch bots
https://archangelic.github.io/pinhook/
MIT License
31 stars 4 forks source link

Handle KeyboardInterrupt to let the bot disconnect with a nice quit message #34

Closed Lucidiot closed 5 years ago

Lucidiot commented 5 years ago

The title says it all! It is possible to handle KeyboardInterrupt just like any other Python exception, so it must be possible to let the bot do a /quit with a predefined message (maybe another keyword argument in the IRCBot class)

archangelic commented 5 years ago

I think the problem is that this is being handled by the irc module, not by pinhook in specific. I think this is something that can be handled once we break out into separate modules. For now I am closing this, and will make note of it in that issue.