thelounge/src/plugins/inputs/quit.js

24 lines
499 B
JavaScript
Raw Normal View History

"use strict";
2016-04-14 10:56:02 +02:00
exports.commands = ["quit"];
exports.allowDisconnected = true;
2015-10-01 00:39:57 +02: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
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,
},
},
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
};