diff --git a/src/SlashCommands.js b/src/SlashCommands.js index 344bac1ddb..711805f8ef 100644 --- a/src/SlashCommands.js +++ b/src/SlashCommands.js @@ -295,7 +295,7 @@ const commands = { // Define the power level of a user op: new Command("op", " []", 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];