From 6eec97b15cd517e61e8c31856ac4985ae317aaf5 Mon Sep 17 00:00:00 2001 From: Janik Kleinhoff Date: Tue, 10 Mar 2015 16:13:48 +0400 Subject: Skip alerts for unsynced channels This avoids triggering alerts for people/bots with notrigger when we haven't synced their account yet. --- modules/inspect.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules') 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) { -- cgit v1.2.3