summaryrefslogtreecommitdiffstats
path: root/lib/ASM
diff options
context:
space:
mode:
authorLibravatarDoug Freed <dwfreed@mtu.edu>2016-02-05 21:13:44 -0700
committerLibravatarDoug Freed <dwfreed@mtu.edu>2016-02-05 21:13:44 -0700
commit60480737736e85d8e324115e29fb9a82052274bc (patch)
tree338e48efb1e678ed866c41b44ea34eeeae28dade /lib/ASM
parentc8675d189b351dbf4767658932d8680e03f3656e (diff)
Don't allow double suppression.
It breaks things.
Diffstat (limited to 'lib/ASM')
-rw-r--r--lib/ASM/Commander.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ASM/Commander.pm b/lib/ASM/Commander.pm
index dee2633..b64103a 100644
--- a/lib/ASM/Commander.pm
+++ b/lib/ASM/Commander.pm
@@ -373,6 +373,10 @@ sub cmd_suppress {
my $chan = lc $1;
my $old = $::channels->{channel}->{$chan}->{monitor};
+ if ($old eq 'no') {
+ $conn->privmsg($event->replyto, "$chan is not currently monitored");
+ return;
+ }
$::channels->{channel}->{$chan}->{monitor} = "no";
$conn->schedule(30*60, sub {
$::channels->{channel}->{$chan}->{monitor} = $old;