2016-10-09 21:14:02 +02:00
|
|
|
"use strict";
|
|
|
|
|
2016-04-14 10:56:02 +02:00
|
|
|
exports.commands = ["quit"];
|
2016-04-03 11:58:59 +02:00
|
|
|
exports.allowDisconnected = true;
|
2015-10-01 00:39:57 +02:00
|
|
|
|
2020-03-21 21:55:36 +01:00
|
|
|
exports.input = function (network, chan, cmd, args) {
|
2018-01-11 12:33:36 +01:00
|
|
|
const client = this;
|
2015-10-01 00:39:57 +02:00
|
|
|
|
2021-05-22 15:35:24 +02:00
|
|
|
client.emit("confirm-dialog", {
|
|
|
|
title: "Remove network",
|
|
|
|
text: `Are you sure you want to quit and remove <b>${network.name}</b>? This cannot be undone.`,
|
|
|
|
button: "Remove network",
|
|
|
|
emit: {
|
|
|
|
target: "network:quit",
|
|
|
|
data: {
|
|
|
|
uuid: network.uuid,
|
2021-09-30 23:28:54 +02:00
|
|
|
quitMessage: args[0] ? args.join(" ") : null,
|
2021-05-22 15:35:24 +02:00
|
|
|
},
|
|
|
|
},
|
2014-09-13 23:29:45 +02:00
|
|
|
});
|
2015-10-01 00:39:57 +02:00
|
|
|
|
2016-03-06 10:24:56 +01:00
|
|
|
return true;
|
2014-09-13 23:29:45 +02:00
|
|
|
};
|