mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Add /stats command
This commit is contained in:
parent
51d775dc4c
commit
0b1c4da0ce
1 changed files with 15 additions and 0 deletions
15
commands.js
15
commands.js
|
@ -186,6 +186,21 @@ export default {
|
|||
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": {
|
||||
usage: "<topic>",
|
||||
description: "Change the topic of the current channel",
|
||||
|
|
Loading…
Reference in a new issue