summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-11-06 01:50:34 +0000
committerLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-11-06 01:50:34 +0000
commit239a92e87b904e259aec354930bb50ac7371d001 (patch)
tree9241e6f1155820623279b21744f7bbc1fdbc21f6 /lib
parent1bb99ccef3d1e859733465374ce495be61a39964 (diff)
Allow disabling rules per-channel
This is a pretty hacky solution and currently only available via a direct config edit. That said, how we deal with channel settings is due for an overhaul anyway.
Diffstat (limited to 'lib')
-rw-r--r--lib/ASM/Inspect.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ASM/Inspect.pm b/lib/ASM/Inspect.pm
index d6121fb..3aad276 100644
--- a/lib/ASM/Inspect.pm
+++ b/lib/ASM/Inspect.pm
@@ -98,6 +98,7 @@ sub inspect {
next unless ASM::Util->mayAlert($chan);
foreach $id (keys %aonx) {
next unless ( grep { $event->{type} eq $_ } split(/[,:; ]+/, $aonx{$id}{type}) );
+ next if exists $::channels->{channel}{$chan}{disable_rules}{$id};
if (defined($response)) {
if ($aonx{$id}{class} ne 'urlcrunch') { next; } #don't run our regular checks if this is being called from a URL checking function
else { $xresult = $::classes->check($aonx{$id}{class}, $aonx{$id}, $id, $event, $chan, $response); }