summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarJanik Kleinhoff <janik@kleinhoff.de>2015-03-10 16:13:48 +0400
committerLibravatarJanik Kleinhoff <janik@kleinhoff.de>2015-03-10 16:13:48 +0400
commit6eec97b15cd517e61e8c31856ac4985ae317aaf5 (patch)
treede880c536d749acb25e5fb48c736c6c53d40d259
parent4754175d195f45a4169be5dfd9045c2eccfd6c54 (diff)
Skip alerts for unsynced channels
This avoids triggering alerts for people/bots with notrigger when we haven't synced their account yet.
-rw-r--r--modules/inspect.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/inspect.pl b/modules/inspect.pl
index c64a855..1f86dbd 100644
--- a/modules/inspect.pl
+++ b/modules/inspect.pl
@@ -41,6 +41,9 @@ sub inspect {
## NB: isn't there a better way to do this with grep, somehow?
%aonx = %{$::rules->{event}};
foreach $chan ( @{$event->{to}} ) {
+ # don't do anything for channels we haven't synced yet
+ # because we can't yet respect stuff like notrigger for these
+ next unless $::synced{$chan};
next unless $chan =~ /^#/;
next if ((defined($::channels->{channel}->{$chan}->{monitor})) and ($::channels->{channel}->{$chan}->{monitor} eq "no"));
foreach $id (keys %aonx) {