diff --git a/src/plugins/inputs/quit.js b/src/plugins/inputs/quit.js index cf01d72..04e0e74 100644 --- a/src/plugins/inputs/quit.js +++ b/src/plugins/inputs/quit.js @@ -10,6 +10,7 @@ module.exports = function(network, chan, cmd, args) { var quitMessage = args[0] ? args.join(" ") : ""; client.networks = _.without(client.networks, network); + client.save(); client.emit("quit", { network: network.id }); diff --git a/src/plugins/irc-events/join.js b/src/plugins/irc-events/join.js index 0ba0998..d407990 100644 --- a/src/plugins/irc-events/join.js +++ b/src/plugins/irc-events/join.js @@ -12,6 +12,7 @@ module.exports = function(irc, network) { name: data.channel }); network.channels.push(chan); + client.save(); client.emit("join", { network: network.id, chan: chan diff --git a/src/plugins/irc-events/nick.js b/src/plugins/irc-events/nick.js index d437b78..e884cde 100644 --- a/src/plugins/irc-events/nick.js +++ b/src/plugins/irc-events/nick.js @@ -17,6 +17,7 @@ module.exports = function(irc, network) { msg: msg }); self = true; + client.save(); client.emit("nick", { network: network.id, nick: nick diff --git a/src/plugins/irc-events/part.js b/src/plugins/irc-events/part.js index 82bee8b..42c0b35 100644 --- a/src/plugins/irc-events/part.js +++ b/src/plugins/irc-events/part.js @@ -11,6 +11,7 @@ module.exports = function(irc, network) { var from = data.nick; if (from == irc.me) { network.channels = _.without(network.channels, chan); + client.save(); client.emit("part", { chan: chan.id }); diff --git a/src/plugins/irc-events/welcome.js b/src/plugins/irc-events/welcome.js index 4c4d5be..9bac7c6 100644 --- a/src/plugins/irc-events/welcome.js +++ b/src/plugins/irc-events/welcome.js @@ -15,6 +15,7 @@ module.exports = function(irc, network) { chan: lobby.id, msg: msg }); + client.save(); client.emit("nick", { network: network.id, nick: nick