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(" ") : "";
|
var quitMessage = args[0] ? args.join(" ") : "";
|
||||||
|
|
||||||
client.networks = _.without(client.networks, network);
|
client.networks = _.without(client.networks, network);
|
||||||
|
client.save();
|
||||||
client.emit("quit", {
|
client.emit("quit", {
|
||||||
network: network.id
|
network: network.id
|
||||||
});
|
});
|
||||||
|
@ -12,6 +12,7 @@ module.exports = function(irc, network) {
|
|||||||
name: data.channel
|
name: data.channel
|
||||||
});
|
});
|
||||||
network.channels.push(chan);
|
network.channels.push(chan);
|
||||||
|
client.save();
|
||||||
client.emit("join", {
|
client.emit("join", {
|
||||||
network: network.id,
|
network: network.id,
|
||||||
chan: chan
|
chan: chan
|
||||||
|
@ -17,6 +17,7 @@ module.exports = function(irc, network) {
|
|||||||
msg: msg
|
msg: msg
|
||||||
});
|
});
|
||||||
self = true;
|
self = true;
|
||||||
|
client.save();
|
||||||
client.emit("nick", {
|
client.emit("nick", {
|
||||||
network: network.id,
|
network: network.id,
|
||||||
nick: nick
|
nick: nick
|
||||||
|
@ -11,6 +11,7 @@ module.exports = function(irc, network) {
|
|||||||
var from = data.nick;
|
var from = data.nick;
|
||||||
if (from == irc.me) {
|
if (from == irc.me) {
|
||||||
network.channels = _.without(network.channels, chan);
|
network.channels = _.without(network.channels, chan);
|
||||||
|
client.save();
|
||||||
client.emit("part", {
|
client.emit("part", {
|
||||||
chan: chan.id
|
chan: chan.id
|
||||||
});
|
});
|
||||||
|
@ -15,6 +15,7 @@ module.exports = function(irc, network) {
|
|||||||
chan: lobby.id,
|
chan: lobby.id,
|
||||||
msg: msg
|
msg: msg
|
||||||
});
|
});
|
||||||
|
client.save();
|
||||||
client.emit("nick", {
|
client.emit("nick", {
|
||||||
network: network.id,
|
network: network.id,
|
||||||
nick: nick
|
nick: nick
|
||||||
|
Loading…
Reference in New Issue
Block a user