Emit the PART event for every channel when disconnecting.

parent 0f0342e6
Pipeline #2027 passed with stages
in 2 minutes and 2 seconds
......@@ -201,6 +201,12 @@ class BanchoClient extends EventEmitter {
* @private
*/
onClose(err) {
// Every currently joined channel should be considered left.
for(const channelName in this.channels)
if(this.channels.hasOwnProperty(channelName))
if(this.channels[channelName].joined)
IrcCommands.PART.emit(this, this.getSelf(), this.channels[channelName]);
if(this.connectState == ConnectStates.Disconnected)
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment