summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2018-03-24 00:02:56 +0000
committerLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2018-03-24 00:02:56 +0000
commitcd280ebb1c45fe1b35ebd7d031be91c062791735 (patch)
treea3fb8af1aeba3f41ed1a38cd87e421405769357f /lib
parenta69be1f7415571e4d303d7bf42b479b842a64032 (diff)
!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.
Diffstat (limited to 'lib')
-rw-r--r--lib/ASM/Commander.pm2
1 files changed, 1 insertions, 1 deletions
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 (?<type>nick|account|host) (?<who>\S+) (?<mode>\+|-)(?<restriction>[a-z0-9_-]+)$' => {
'flag' => 'a',
'cmd' => \&cmd_restrict },
- '^\s*\!ops ?(?<chan>#\S+)? ?(?<reason>.*)' => {
+ '^\s*\!ops(?:\s+(?<chan>#\S+))?[\s|]+(?<reason>.*)' => {
'nohush' => 'nohush',
'cmd' => \&cmd_ops },
'^;blacklist (?<string>.+)' => {