martynsmith / node-irc

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

Emit event lastly for PART and KICK #476

Closed senektra closed 2 years ago

senektra commented 7 years ago

In my opinion it makes more sense to emit the KICK and PART event once the client has finished updating what it needs to.

I remember having some problems due to this when I was running a bot of mine, the biggest issue being accessing the channel's object before it was updated (within listeners for KICK and PART).

graulund commented 7 years ago

A definite plus one to this one from me. It would be nice to have some consistency in when the events are emitted — the JOIN event and others perform logic before the event.