martynsmith / node-irc

NodeJS IRC client library
GNU General Public License v3.0
1.33k stars 424 forks source link

Ability to detect, whether join (or other event) was successful or not #436

Open Cysioland opened 8 years ago

Cysioland commented 8 years ago

Scenario:

  1. I do Client.join() with callback, supplying incorrect channel key
  2. Then I realize, what've I done, and supply correct channel key

    Desired behavior:

  3. Callback should be called only once, when we successfully enter the channel

    Actual behavior:

  4. Callback gets called twice

    Additional features, while we're at it

  5. When join doesn't happen due to ex. user needing invitation or with aforementioned channel key error, there should be the way to bind to it easily, and not just parse the 'error' callback