2014-07-03 22:49:15 +00:00
|
|
|
var _ = require("lodash");
|
|
|
|
|
2014-07-02 22:00:11 +00:00
|
|
|
module.exports = function(network, chan, cmd, args) {
|
2014-07-03 22:49:15 +00:00
|
|
|
if (cmd != "quit" && cmd != "disconnect") {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var client = this;
|
|
|
|
var irc = network.irc;
|
|
|
|
|
|
|
|
client.networks = _.without(client.networks, network);
|
|
|
|
client.emit("quit", {
|
|
|
|
network: network.id
|
|
|
|
});
|
|
|
|
|
|
|
|
irc.quit();
|
2014-06-26 23:05:47 +00:00
|
|
|
};
|