return;
}
- # Check if address should be ignored.
- if(&_IsOnIgnoreList($bin_address)) {
+ # Check if the given command is not "unblock" and the address should be ignored.
+ if(($command ne "unblock") && (&_IsOnIgnoreList($bin_address))) {
# Log message.
$logger->Log("info", "Ignoring event for $address, because it is part of the ignore list.");
return;
# Drop address from blockhash.
delete ($blockhash{$address});
+ # Drop address from counthash if the address has been unblocked
+ # by the user. This happens when the called module is "Socket".
+ if ($module eq "Socket") {
+ delete ($counthash{$address});
+ }
+
# Everything worked well, return nothing.
return undef;
}
my $self = shift;
# Log the call for flushing.
- $logger->Log("info", "Flush has been called...");
+ $logger->Log("debug", "Flush has been called...");
# Call flush.
my $error = &DoFlush();
my $amount = scalar(keys(%ignorehash));
# Write out log message.
- $logger->Log("debug", "Ignore list currently contains $amount entries.");
+ $logger->Log("debug", "Ignore list currently contains $amount entries:");
+
+ # Sort the ignore hash.
+ my @sorted_addresses = &Guardian::Base::SortAddressHash(\%ignorehash);
+
+ # Loop through the entire array.
+ foreach my $address (@sorted_addresses) {
+ # Log the ignored address.
+ $logger->Log("debug", "\- $address");
+ }
+
+ # Finished return nothing.
+ return;
}
#