jaraco / irc

Full-featured Python IRC library for Python.
MIT License
394 stars 86 forks source link

Within on_quit there's no way to determine pre-quit user's channel list #29

Closed jaraco closed 8 years ago

jaraco commented 8 years ago

If you try to implement IRC logging on and IRC bot by subclassing SingleServerIRCBot, there's no way to learn on which channels the user was present when handling on_quit.


jaraco commented 8 years ago

Is that true? The SingleServerIRCBot instance keeps an attribute 'channels', an IRCDict mapping channel names to Channel objects. Each channel object has a users method.

I'm not sure quite what you mean by "on which channels the user was present" because user is somewhat ambiguous here. Perhaps all you need is:

self.channels.keys()

Feel free to re-open or elaborate on the issue if that doesn't do what you need.


Original comment by: Jason R. Coombs