Add separate /disconnect command

This commit is contained in:
Pavel Djundik 2016-04-14 11:56:02 +03:00
parent e3a1bf2f87
commit 047a79ead6
3 changed files with 9 additions and 1 deletions

View File

@ -36,6 +36,7 @@ var inputs = [
"part", "part",
"action", "action",
"connect", "connect",
"disconnect",
"invite", "invite",
"kick", "kick",
"mode", "mode",

View File

@ -0,0 +1,7 @@
exports.commands = ["disconnect"];
exports.input = function(network, chan, cmd, args) {
var quitMessage = args[0] ? args.join(" ") : "";
network.irc.quit(quitMessage);
};

View File

@ -1,6 +1,6 @@
var _ = require("lodash"); var _ = require("lodash");
exports.commands = ["quit", "disconnect"]; exports.commands = ["quit"];
exports.allowDisconnected = true; exports.allowDisconnected = true;
exports.input = function(network, chan, cmd, args) { exports.input = function(network, chan, cmd, args) {