node-irc icon indicating copy to clipboard operation
node-irc copied to clipboard

disconnect() method does't fire 'quit' event

Open Booster2ooo opened this issue 8 years ago • 4 comments

Hello,

Calling client.disconnect() doesn't fire the 'quit' event. As a workaround, I emit the event manually in the disconnect() callback but I think it should be fired automatically.

Thanks for your work :)

Booster2ooo avatar Jan 16 '16 18:01 Booster2ooo

It's on a todo list https://github.com/martynsmith/node-irc/blob/master/lib/irc.js#L543 and then it breaks without emiting the event.

moshmage avatar Jan 22 '16 01:01 moshmage

How useful is it to trigger the 'quit' event on your own intentional quit?

tritium21 avatar Sep 04 '16 07:09 tritium21

@tritium21 > Let's say, for instance, that you've got a socket open (because of a DCC). You may want to close that socket when you disconnect.

Booster2ooo avatar Sep 06 '16 08:09 Booster2ooo

But why would you want it on the “another user has quit” event? Wouldn’t it be better to have a “I lost connection” event? Or “I quit” event?

tritium21 avatar Sep 06 '16 10:09 tritium21