Merge pull request #297 from thelounge/xpaw/save-left-channel

Save user when parting channels
This commit is contained in:
Jérémie Astori 2016-05-06 18:05:12 -04:00
commit 2fdb462654

View File

@ -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;
};