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

Add twitch-specific functionality #425

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Twitch-Plays-Pokemon
Copy link

Parse Twitch-specific message metadata.

Twitch includes information such as color, name with capitalization and emote information alongside messages in a (AFAICT) non-standard way.

// twitch.tv-specific, twitch stuffs a bunch of useful information here
// need to do a client.send("CAP REQ", "twitch.tv/tags") first
if(line.charAt(0) == "@") {
var tagend = line.indexOf(" ");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variables declarations for aliases should not be used, but if you REALLY NEED them aliases, you should declare the variable at function-start and not on a if-statement.

@moshmage
Copy link

moshmage commented Nov 5, 2015

This is a server-specific problem, not a RFC/Library specific problem. I don't see how everyone would benefit from this.

You're telling us that you need to do a client.send("CAP REQ", "twitch.tv/tags") first so I'm thinking there's a specifc RAW event that the twitch IRC server sends when you ask for CAP REQ, yes?
If the latter is true, then you should've simply made a case-check;

I'm thinking different people would like different "twitch tag solvers" for "different reasons" so, I'd go even further and set a configurable option to "should we listen to an array custom RAW events?" and its counter-part callback.

This way it would:
a) solve all twitchs problem
b) solve everyones' flavour of IRC problem
c) be irrelevant to whoever does not need those.

Also, please adhere to the code-syntax (spaces between if and (, single-quotes instead of doubled ones, etc)

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

Successfully merging this pull request may close these issues.

3 participants