jaraco / irc

Full-featured Python IRC library for Python.
MIT License
390 stars 85 forks source link

client.py: currenttopic -> on_topic? #129

Closed yuri-sevatz closed 6 years ago

yuri-sevatz commented 7 years ago

I noticed there doesn't seem to be anything binding the 'currenttopic' command to the 'on_topic' callback after the currenttopic dispatcher fires when joining a new channel.

Is this intentional? I figured out that I can bind this via setting up an on_currenttopic callback, but when I checked the implementation it doesn't look like on_topic is used at all.

Manually calling self.topic() doesn't seem to trigger it either (though, looking at the way they're handled in the RFC, this looks like it shouldn't matter who asked for it).

jaraco commented 6 years ago

Let me see if I understand your problem. You expect a currenttopic command to trigger the on_topic callback. I wouldn't expect that because commands are mapped by name, so I would expect a currenttopic command to be handled by an on_currenttopic callback.

Can you provide some references or description to what currenttopic is and how it relates to topic?

Perhaps all you need is to implement a subclass that handles on_currenttopic. If you think that the current implementation should be handling currenttopic commands, please provide a description of what you think the IRC library (and which class specifically) should be doing if such a command is received.

jaraco commented 6 years ago

I'll close this ticket for now, but if you wish to revive the conversation, please feel free.