Logmsg "nulllist", $sender, "Discarded message";
} # Nulllist
-sub OnBlacklist ($) {
- my ($sender) = @_;
+sub OnBlacklist ($;$) {
+ my ($sender, $update) = @_;
- return CheckOnList "black", $sender;
+ return CheckOnList "black", $sender, $update;
} # CheckOnBlacklist
-sub OnNulllist ($) {
- my ($sender) = @_;
+sub OnNulllist ($;$) {
+ my ($sender, $update) = @_;
- return CheckOnList "null", $sender;
+ return CheckOnList "null", $sender, $update;
} # CheckOnNulllist
-sub OnWhitelist {
- my ($sender, $userid) = @_;
+sub OnWhitelist ($;$) {
+ my ($sender, $userid, $update) = @_;
if (defined $userid) {
MAPSDB::SetContext $userid;
} # if
- return CheckOnList "white", $sender;
+ return CheckOnList "white", $sender, $update;
} # OnWhitelist
sub OptimizeDB () {
return;
} # RecordHit
-sub CheckOnList ($$) {
+sub CheckOnList ($$;$) {
# CheckOnList will check to see if the $sender is on the $listfile.
# Return 1 if found 0 if not.
- my ($listtype, $sender) = @_;
+ my ($listtype, $sender, $update) = @_;
+
+ $update //= 1;
my $status = 0;
my $rule;
$rule .= " - $comment" if $comment and $comment ne '';
$status = 1;
- RecordHit $listtype, $sequence, ++$hit_count;
+ RecordHit $listtype, $sequence, ++$hit_count if $update;
last;
} # if
# Then we process nulllist people.
#
# Finally, we handle return processing
- ($onlist, $rule) = OnWhitelist $sender;
+ ($onlist, $rule) = OnWhitelist $sender, 0;
if ($onlist) {
print div {-align => "center"},
"Messages from", b ($sender), "will be", b ("delivered"), br, hr;
print $rule;
} else {
- ($onlist, $rule) = OnBlacklist $sender;
+ ($onlist, $rule) = OnBlacklist $sender, 0;
if ($onlist) {
print div {-align => "center"},
"Messages from", b ($sender), "will be", b ("blacklisted"), br, hr;
print $rule;
} else {
- ($onlist, $rule) = OnNulllist $sender;
+ ($onlist, $rule) = OnNulllist $sender, 0;
if ($onlist) {
print div {-align => "center"},
} # if
} # if
- print br div {-align => "center"},
- submit (-name => "submit",
- -value => "Close",
- -onClick => "window.close (self)");
+ print br div {-align => "center"},
+ submit (-name => "submit",
+ -value => "Close",
+ -onClick => "window.close (self)");
} # Body
sub Footing {
#
# (c) Copyright 2000-2006, Andrew@DeFaria.com, all rights reserved.
#
-################################################################################use strict;
+################################################################################
+use strict;
use warnings;
use MIME::Words qw(:all);
my ($onlist, $rule);
$rule = 'none';
- ($onlist, $rule) = OnWhitelist $sender;
+ ($onlist, $rule) = OnWhitelist $sender, 0;
unless ($onlist) {
- ($onlist, $rule) = OnBlacklist $sender;
+ ($onlist, $rule) = OnBlacklist $sender, 0;
unless ($onlist) {
- ($onlist, $rule) = OnNulllist $sender;
+ ($onlist, $rule) = OnNulllist $sender, 0;
} # unless
} # unless
} # PrintTable
# Main
+my $condition;
my @scripts = ('ListActions.js');
my $heading_date =$date ne '' ? ' on ' . FormatDate ($date) : '';