Add /j alias for /join

This commit is contained in:
Drew DeVault 2021-05-27 08:13:22 -04:00 committed by Simon Ser
parent 70c0dd1d78
commit 51d775dc4c

View file

@ -9,6 +9,18 @@ function getActiveClient(app) {
return app.clients.get(buf.network);
}
const join = {
usage: "<name>",
description: "Join a channel",
execute: (app, args) => {
var channel = args[0];
if (!channel) {
throw new Error("Missing channel name");
}
getActiveClient(app).send({ command: "JOIN", params: [channel] });
},
};
export default {
"buffer": {
usage: "<name>",
@ -46,17 +58,8 @@ export default {
app.openHelp();
},
},
"join": {
usage: "<name>",
description: "Join a channel",
execute: (app, args) => {
var channel = args[0];
if (!channel) {
throw new Error("Missing channel name");
}
getActiveClient(app).send({ command: "JOIN", params: [channel] });
},
},
"j": join,
"join": join,
"kick": {
usage: "<user>",
description: "Remove a user from the channel",