IRC-js icon indicating copy to clipboard operation
IRC-js copied to clipboard

Feature: Post-callbacks

Open Spotnyk opened this issue 13 years ago • 3 comments

You thought about adding optional callback support to helpers which can (in most cases) be detected complete? Such as channelMode, join, etc.

With channelMode, in most cases you will see the MODE bounced back to the channel, so you could fire a callback. Or you know when the server had joined you to a channel, so a callback could be fired there.

Granted this can be done above the framework, but if it were a part it could make working with it much easier (as half my slowdowns have been dealing with knowing when something completes).

Just a thought.

Spotnyk avatar Jun 20 '11 12:06 Spotnyk

I like it! I'll have to comb through the spec, and see what kinds of things give me "finished" message. Some might be tricky, because the desired data is not always returned on the same message (e.g. first, multiple, or last).

gf3 avatar Jun 20 '11 16:06 gf3

Understood.

In any case, you can be clear in the docs that callbacks should be tested before relying on them.

Or, depending on how much commitment to this project you're planing, could start a "supported server daemon" list. :)

Completely off topic, with the research this project has required already; have you toyed with the thought of rolling a server yourself? :P

Spotnyk avatar Jun 20 '11 16:06 Spotnyk

In the nlogax/experimental branch, I have callbacks for join and… maybe that’s it. But I want to add more, in fact I just commented on another issue requesting some help in identifying which commands would benefit from callbacks. I realize you commented a year ago, but if you feel like it, picking those out would be of great help (I have become somewhat code-blind). Also in that branch, there is a very crummy “server” used for testing, would be awesome to develop it into an actual server; both for making tests much better and for having a complete IRC package.

Edit: the branch started out as me hacking around, but @gf3 liked the direction it was going in and we decided it should be the next major version.

ghost avatar Aug 20 '12 10:08 ghost