From cd280ebb1c45fe1b35ebd7d031be91c062791735 Mon Sep 17 00:00:00 2001 From: Janik Kleinhoff Date: Sat, 24 Mar 2018 00:02:56 +0000 Subject: !ops: adjust command regex - Be a bit more reasonable about spaces - Ignore "|" between !ops and the message Using "!ops | foo bar" is common in the Ubuntu namespace at least, so there isn't much point in including the | in the reported message. If this breaks anything, blame Unit193 for being perfectionistic. --- lib/ASM/Commander.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ASM/Commander.pm b/lib/ASM/Commander.pm index edad532..b4572fc 100644 --- a/lib/ASM/Commander.pm +++ b/lib/ASM/Commander.pm @@ -109,7 +109,7 @@ my $cmdtbl = { '^;restrict (?nick|account|host) (?\S+) (?\+|-)(?[a-z0-9_-]+)$' => { 'flag' => 'a', 'cmd' => \&cmd_restrict }, - '^\s*\!ops ?(?#\S+)? ?(?.*)' => { + '^\s*\!ops(?:\s+(?#\S+))?[\s|]+(?.*)' => { 'nohush' => 'nohush', 'cmd' => \&cmd_ops }, '^;blacklist (?.+)' => { -- cgit v1.2.3