Custom Command Handling
I'm working with a IRC that has custom CAP (capabilities), which adds more commands. Is there a good way to handle these messages so they can be handled outside of the ExIrc.Client?
Requesting capabilites:
< CAP REQ :twitch.tv/membership
Example message from the IRC server
%IrcMessage{args: ["#rockerboo", "rockerboo"], cmd: "CLEARCHAT", ctcp: false, host: [], nick: [], server: "tmi.twitch.tv", user: []}
https://github.com/justintv/Twitch-API/blob/master/chat/capabilities.md#membership
I think we just need to expand this function to send a new event (maybe :custom or :unrecognized) or something, that way your handler can accept all unrecognized messages and do whatever you wish with them. Thoughts?
That'd probably be great! Maybe just pass a :cmd event?
I wouldn't mind that, something to keep in mind though is that something received by that callback may not actually be a command (it could just be garbage), so we probably want a way to signify that while it's an event that can be handled, you can't necessarily rely on it being a valid message.
Would it be better to have some list of "CMD" options to handle?
['MODE', 'USERSTATE', 'CAP']