]> git.ipfire.org Git - people/stevee/guardian.git/blobdiff - modules/Events.pm
Display ignored addresses when running in debug mode.
[people/stevee/guardian.git] / modules / Events.pm
index ec253c05d33526db1b9b13302f6dfcccde87b574..c451914da5b34aa63a9d877887cede3e829ccdd5 100644 (file)
@@ -320,6 +320,12 @@ sub CallUnblock ($) {
        # 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;
 }
@@ -478,7 +484,19 @@ sub GenerateIgnoreList($) {
        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;
 }
 
 #