thelounge/src/plugins/inputs/quit.js
2021-09-30 14:28:54 -07:00

24 lines
499 B
JavaScript

"use strict";
exports.commands = ["quit"];
exports.allowDisconnected = true;
exports.input = function (network, chan, cmd, args) {
const client = this;
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,
quitMessage: args[0] ? args.join(" ") : null,
},
},
});
return true;
};