jaraco / irc

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

support tags in IRCv3 #62

Closed jaraco closed 8 years ago

jaraco commented 8 years ago

http://ircv3.net/specs/core/message-tags-3.2.html

twitch chat already using it, but for now i parse them in on_all_raw_messages


jaraco commented 8 years ago

Sounds good. Would you be willing to put together a pull request?


Original comment by: Jason R. Coombs

jaraco commented 8 years ago

i looked into it before, but its too complicated for me


Original comment by: Mihail Latyshov

jaraco commented 8 years ago

I would be happy to help, but I don't have the time to be able to design and implement this feature from scratch.

Let's start from the beginning; can you document what sort of user experience you'd like to see from the library? For example, if the feature were implemented how would you propose that twitch solicit the tags from the ServerConnection? Would tags be associated with any Event?


Original comment by: Jason R. Coombs

jaraco commented 8 years ago

can you document what sort of user experience you'd like to see from the library?

nothing fancy, just tags inside event

i would use it like this

def on_pubmsg(self, connection, event):
    logging.info(event.tags)

tags will be just dict

Would tags be associated with any Event?

if there are tags, event will have tags inside, otherwise just None

but as i said, i already use them via on_all_raw_messages, so this issue is just a proposal, nothing else


Original comment by: Mihail Latyshov

jaraco commented 8 years ago

I added a Pull request to handle the IRCv3 tags.


Original comment by: kimen91

jaraco commented 8 years ago

Pull Request #34 has been released as 12.2. Please test and re-open if that doesn't provide the solution. Huge thanks to @kimen91.


Original comment by: Jason R. Coombs