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

self.chan and self.chandata events #243

Closed
MrSam opened this issue Jun 22, 2014 · 2 comments
Closed

self.chan and self.chandata events #243

MrSam opened this issue Jun 22, 2014 · 2 comments

Comments

@MrSam
Copy link

MrSam commented Jun 22, 2014

Hi,
I'm writing a program and i need to know at all times what the current status is of all channels and their members. So either i will add listners for each of the events that can cause a change in this (join,part,kick, etc) either we update irc.js so that everytime a change to one of those is done a event is emitted, or we add self.addListeners so emit this.

What do you think ? If you agree i can do the change and create a pull request, if not i'll add listners to my own code.

@osslate
Copy link
Collaborator

osslate commented Jun 22, 2014

I'm confused as to what you mean. The events for join, part and kick are emitted, so you can write your code to track the status of the channel.

As a heads up, in the planned rewrite, you'll be able to do something similar to this:

var chan = client.channel("#chan");

if (chan.isJoined) {
    console.log("hurray!");
}

chan.on("join", function() {...});

@MrSam
Copy link
Author

MrSam commented Jun 23, 2014

That i know, the only suggestion i had is to create an additional event that covers all the others so that i only have to listen to that specific one.

Either way, adressed it in my own code, so for me this issue can be closed.

Thanks again for all your effort in this project!

@MrSam MrSam closed this as completed Jun 23, 2014
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