From 9decb30ef8777f0bf1307517cf3717da2d7761c1 Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Thu, 20 Oct 2011 23:16:10 +0000 Subject: Added a feature to be able to prevent channels from being monitored --- modules/inspect.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/inspect.pl b/modules/inspect.pl index 84c20a1..60dbbda 100644 --- a/modules/inspect.pl +++ b/modules/inspect.pl @@ -37,13 +37,11 @@ sub inspect { $iaddr = gethostbyname($event->{host}); $rev = join('.', reverse(unpack('C4', $iaddr))).'.' if (defined $iaddr); } -# %monx = defined($::channels->{channel}->{master}->{event}) ? %{$::channels->{channel}->{master}->{event}} : (); ## NB: isn't there a better way to do this with grep, somehow? %aonx = %{$::channels->{channel}->{master}->{event}}; foreach $chan ( @{$event->{to}} ) { next unless $chan =~ /^#/; -# %conx = defined($::channels->{channel}->{lc $chan}->{event}) ? %{$::channels->{channel}->{lc $chan}->{event}} : (); -# %aonx = (%monx, %conx); + next if ((defined($::channels->{channel}->{$chan}->{monitor})) and ($::channels->{channel}->{$chan}->{monitor} eq "no")); foreach $id (keys %aonx) { next unless ( grep { $event->{type} eq $_ } split(/[,:; ]+/, $aonx{$id}{type}) ); next if ($aonx{$id}{class} eq 'dnsbl') && ($event->{host} =~ /(fastwebnet\.it|fastres\.net)$/); #this is a bad hack -- cgit v1.2.3