meebey / SmartIrc4net

IRC C# Library
http://www.meebey.net/projects/smartirc4net/
Other
126 stars 52 forks source link

Add support for USERSTATE and ROOMSTATE #32

Closed djkaty closed 9 years ago

djkaty commented 9 years ago

From Twitch, here are example messages from the IRC server:

@broadcaster-lang=;r9k=0;slow=0;subs-only=0 :tmi.twitch.tv ROOMSTATE #djkatytest @color=;display-name=JaraxxusBot;emote-sets=0;subscriber=0;turbo=0;user-type=mod :tmi.twitch.tv USERSTATE #djkaty

OnUserState and OnRoomState events and corresponding ReceiveType enum entries added etc.

(this commit doesn't include tag support so on its own this doesn't enable any functionality; after tag support is committed the IrcMessageData object has an extra Tags item which will allow the user to retrieve all the tags in the USERSTATE or ROOMSTATE messages)

meebey commented 9 years ago

This 2 new events are not part of the IRC RFC but probably specific to Twitch. This is a bit problematic to merge as the user of the library wouldn't know this new events are just for Twitch... I wonder if we should use class specialization for this,say a TwitchIrcClient : IrcClient...

djkaty commented 9 years ago

That works for me, and in fact, since one of the other enhancements I made was specifically to streamline the communications for Twitch by adding a _TwitchProtocol flag, re-factoring it into a derived class would in retrospect probably be better. I will work on this and submit new changes.

N00b moment: how do I undo/revert the commit I made to my fork?

meebey commented 9 years ago

Depends on the terminology, if you mean revert as in like it never happened then the command is: git reset --hard $commitid but be warned all changes will be gone to that commitid like it never happened, the changes are lost :)