node-irc
node-irc copied to clipboard
disconnect() method does't fire 'quit' event
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 :)
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.
How useful is it to trigger the 'quit' event on your own intentional quit?
@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.
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?