diff options
| author | 2011-10-20 23:16:10 +0000 | |
|---|---|---|
| committer | 2011-10-20 23:16:10 +0000 | |
| commit | 9decb30ef8777f0bf1307517cf3717da2d7761c1 (patch) | |
| tree | 79fd2a808e695ea1793a882dbf02b6704219abda /modules/inspect.pl | |
| parent | 2e19fc7a2c087a4a7d32bdc10d41d88218dfe989 (diff) | |
Added a feature to be able to prevent channels from being monitored
Diffstat (limited to 'modules/inspect.pl')
| -rw-r--r-- | modules/inspect.pl | 4 |
1 files changed, 1 insertions, 3 deletions
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 |
