Allow argument to op slashcommand to be negative as PLs can be -ve
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
fa14bc9b8d
commit
ab347c82f7
1 changed files with 1 additions and 1 deletions
|
@ -295,7 +295,7 @@ const commands = {
|
|||
// Define the power level of a user
|
||||
op: new Command("op", "<userId> [<power level>]", function(roomId, args) {
|
||||
if (args) {
|
||||
const matches = args.match(/^(\S+?)( +(\d+))?$/);
|
||||
const matches = args.match(/^(\S+?)( +(-?\d+))?$/);
|
||||
let powerLevel = 50; // default power level for op
|
||||
if (matches) {
|
||||
const userId = matches[1];
|
||||
|
|
Loading…
Reference in a new issue