Remember network and channels
This commit is contained in:
parent
5b1820ca2e
commit
152395d303
|
@ -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
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -17,6 +17,7 @@ module.exports = function(irc, network) {
|
|||
msg: msg
|
||||
});
|
||||
self = true;
|
||||
client.save();
|
||||
client.emit("nick", {
|
||||
network: network.id,
|
||||
nick: nick
|
||||
|
|
|
@ -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
|
||||
});
|
||||
|
|
|
@ -15,6 +15,7 @@ module.exports = function(irc, network) {
|
|||
chan: lobby.id,
|
||||
msg: msg
|
||||
});
|
||||
client.save();
|
||||
client.emit("nick", {
|
||||
network: network.id,
|
||||
nick: nick
|
||||
|
|
Loading…
Reference in New Issue