From 4585583ebce212d16af431ff64e075a0f9a03cfd Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Fri, 6 May 2016 11:37:16 +0300 Subject: [PATCH] Save user when parting channels --- src/plugins/inputs/part.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/plugins/inputs/part.js b/src/plugins/inputs/part.js index 05ea67d5..66f626d8 100644 --- a/src/plugins/inputs/part.js +++ b/src/plugins/inputs/part.js @@ -13,15 +13,18 @@ exports.input = function(network, chan, cmd, args) { return; } - var irc = network.irc; - if (irc && chan.type === "channel") { - irc.part(chan.name, args.join(" ")); - } - network.channels = _.without(network.channels, chan); this.emit("part", { chan: chan.id }); + if (chan.type === "channel") { + this.save(); + + if (network.irc) { + network.irc.part(chan.name, args.join(" ")); + } + } + return true; };