diff --git a/commands.js b/commands.js index bd61c4d..7b5f5d1 100644 --- a/commands.js +++ b/commands.js @@ -9,6 +9,18 @@ function getActiveClient(app) { return app.clients.get(buf.network); } +const join = { + usage: "", + 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: "", @@ -46,17 +58,8 @@ export default { app.openHelp(); }, }, - "join": { - usage: "", - 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: "", description: "Remove a user from the channel",