commands: add password param to /join
This commit is contained in:
parent
9f93e200ed
commit
fab42ba2ee
3 changed files with 14 additions and 6 deletions
|
@ -54,14 +54,18 @@ function markServerBufferUnread(app) {
|
|||
}
|
||||
|
||||
const join = {
|
||||
usage: "<name>",
|
||||
usage: "<name> [password]",
|
||||
description: "Join a channel",
|
||||
execute: (app, args) => {
|
||||
let channel = args[0];
|
||||
if (!channel) {
|
||||
throw new Error("Missing channel name");
|
||||
}
|
||||
app.open(channel);
|
||||
if (args.length > 1) {
|
||||
app.open(channel, null, args[1]);
|
||||
} else {
|
||||
app.open(channel);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue