summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarDoug Freed <dwfreed@mtu.edu>2016-01-15 02:27:47 -0700
committerLibravatarDoug Freed <dwfreed@mtu.edu>2016-01-15 02:27:47 -0700
commite2a301160379d9dfe22d3e7dd752d2c2ef7c2f80 (patch)
tree97c382450d301e390498aa79712aaee7ef448312
parent4fc79d7b0328a1336c85c278f4b7befc43e29806 (diff)
downloadantispammeta-e2a301160379d9dfe22d3e7dd752d2c2ef7c2f80.tar.bz2
antispammeta-e2a301160379d9dfe22d3e7dd752d2c2ef7c2f80.tar.xz
antispammeta-e2a301160379d9dfe22d3e7dd752d2c2ef7c2f80.tar.zst
Handle !ops without target in PM better
-rw-r--r--lib/ASM/Commander.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ASM/Commander.pm b/lib/ASM/Commander.pm
index 47728ae..6d194d2 100644
--- a/lib/ASM/Commander.pm
+++ b/lib/ASM/Commander.pm
@@ -835,8 +835,8 @@ sub cmd_ops {
my $tgt = lc $event->{to}->[0];
$tgt = lc $+{chan} if defined($+{chan});
my $msg = $+{reason};
- if ( (($::channels->{channel}->{$tgt}->{monitor} // "yes") eq "no") || #we're not monitoring this channel
- !($tgt ~~ $::sn{lc $event->{nick}}->{mship})) { #they're not on the channel they're calling !ops for
+ if ( $tgt =~ /^#/ && ((($::channels->{channel}->{$tgt}->{monitor} // "yes") eq "no") || #we're not monitoring this channel
+ !($tgt ~~ $::sn{lc $event->{nick}}->{mship})) ) { #they're not on the channel they're calling !ops for
return;
}
if (defined($::ignored{$tgt}) && ($::ignored{$tgt} >= $::RISKS{'opalert'})) {