Add /stats command

This commit is contained in:
Drew DeVault 2021-05-27 08:36:46 -04:00 committed by Simon Ser
parent 51d775dc4c
commit 0b1c4da0ce

View file

@ -186,6 +186,21 @@ export default {
client.send({ command: "SETNAME", params: [newRealname] }); client.send({ command: "SETNAME", params: [newRealname] });
}, },
}, },
"stats": {
usage: "<query> [<server>]",
description: "Requests server statistics",
execute: (app, args) => {
var query = args[0];
if (!query) {
throw new Error("Missing query");
}
var params = [query];
if (args.length > 1) {
params.push(args.slice(1).join(" "));
}
getActiveClient(app).send({ command: "STATS", params });
},
},
"topic": { "topic": {
usage: "<topic>", usage: "<topic>",
description: "Change the topic of the current channel", description: "Change the topic of the current channel",