From e2a301160379d9dfe22d3e7dd752d2c2ef7c2f80 Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Fri, 15 Jan 2016 02:27:47 -0700 Subject: Handle !ops without target in PM better --- lib/ASM/Commander.pm | 4 ++-- 1 file 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'})) { -- cgit v1.2.3