Remember network and channels

This commit is contained in:
Mattias Erming 2014-10-12 01:59:01 +02:00
parent 5b1820ca2e
commit 152395d303
5 changed files with 5 additions and 0 deletions

View File

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

View File

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

View File

@ -17,6 +17,7 @@ module.exports = function(irc, network) {
msg: msg
});
self = true;
client.save();
client.emit("nick", {
network: network.id,
nick: nick

View File

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

View File

@ -15,6 +15,7 @@ module.exports = function(irc, network) {
chan: lobby.id,
msg: msg
});
client.save();
client.emit("nick", {
network: network.id,
nick: nick