diff options
| author | 2016-02-05 21:13:44 -0700 | |
|---|---|---|
| committer | 2016-02-05 21:13:44 -0700 | |
| commit | 60480737736e85d8e324115e29fb9a82052274bc (patch) | |
| tree | 338e48efb1e678ed866c41b44ea34eeeae28dade /lib/ASM | |
| parent | c8675d189b351dbf4767658932d8680e03f3656e (diff) | |
Don't allow double suppression.
It breaks things.
Diffstat (limited to 'lib/ASM')
| -rw-r--r-- | lib/ASM/Commander.pm | 4 |
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; |
