From ab347c82f7479eca4794b74eb37b2ae728403889 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 21 Dec 2017 12:23:48 +0000 Subject: [PATCH] Allow argument to op slashcommand to be negative as PLs can be -ve Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/SlashCommands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];