mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
Add support for /mode without arguments
This commit is contained in:
parent
5b7ab2652b
commit
dd753aab2e
1 changed files with 3 additions and 3 deletions
|
@ -179,11 +179,11 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"mode": {
|
"mode": {
|
||||||
usage: "[target] <modes> [mode args...]",
|
usage: "[target] [modes] [mode args...]",
|
||||||
description: "Change channel or user mode",
|
description: "Query or change a channel or user mode",
|
||||||
execute: (app, args) => {
|
execute: (app, args) => {
|
||||||
var target = args[0];
|
var target = args[0];
|
||||||
if (target.startsWith("+") || target.startsWith("-")) {
|
if (!target || target.startsWith("+") || target.startsWith("-")) {
|
||||||
var activeChannel = getActiveChannel(app);
|
var activeChannel = getActiveChannel(app);
|
||||||
args = [activeChannel, ...args];
|
args = [activeChannel, ...args];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue