Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Command Handling #28

Open
rockerBOO opened this issue Jun 19, 2015 · 4 comments
Open

Custom Command Handling #28

rockerBOO opened this issue Jun 19, 2015 · 4 comments

Comments

@rockerBOO
Copy link
Contributor

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

@bitwalker
Copy link
Owner

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?

@rockerBOO
Copy link
Contributor Author

That'd probably be great! Maybe just pass a :cmd event?

@bitwalker
Copy link
Owner

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.

@rockerBOO
Copy link
Contributor Author

Would it be better to have some list of "CMD" options to handle?

['MODE', 'USERSTATE', 'CAP']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants