diff options
author | Alexander Wirt <formorer@debian.org> | 2009-05-24 16:50:51 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-12-19 16:46:06 +0100 |
commit | c23e1a070a7352885ae0490c4012a8fc9d1f3b39 (patch) | |
tree | 4591630eb25bd10dc65ad00d6dbdfc3976942577 /listadmin.pl | |
parent | b8f02a86db5b51b0949c9101751b824503234215 (diff) | |
download | listadmin-c23e1a070a7352885ae0490c4012a8fc9d1f3b39.tar.gz listadmin-c23e1a070a7352885ae0490c4012a8fc9d1f3b39.tar.bz2 listadmin-c23e1a070a7352885ae0490c4012a8fc9d1f3b39.tar.xz |
add support for discarding subscription requests
Diffstat (limited to 'listadmin.pl')
-rwxr-xr-x | listadmin.pl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/listadmin.pl b/listadmin.pl index b85a471..03c2e7e 100755 --- a/listadmin.pl +++ b/listadmin.pl @@ -254,7 +254,7 @@ sub process_subscriptions { } my $count = keys (%subscribers); my $def = $config->{"subdefault"}; - my $prompt = 'Accept/Reject/Skip/Quit'; + my $prompt = 'Accept/Discard/Reject/Skip/Quit'; $prompt .= " [" . uc($def) . "]" if $def; $prompt .= " ? "; @@ -281,6 +281,9 @@ sub process_subscriptions { } elsif ($ans eq "a") { $change->{$id} = [ "sa" ]; last; + } elsif ($ans eq "d") { + $change->{$id} = [ "sd" ]; + last; } elsif ($ans eq "r") { my $r = prompt ("Why do you reject? [optional] "); unless (defined $r) { @@ -295,6 +298,7 @@ and pressing Return. a Accept -- allow the user to join the mailing list r Reject -- notify sender that the request was turned down + d Discard -- silently discard the request s Skip -- do not decide now, leave it for later q Quit -- go on to approving messages @@ -1082,6 +1086,7 @@ sub set_param_values { "d" => 3, "sa" => 4, # subscribe approve "sr" => 2, # subscribe reject + "sd" => 3, # subsribe discard }; } else { $data->{"global"}{"actions"} = { "a" => 0, @@ -1116,7 +1121,7 @@ sub read_config { my %act = ("approve" => "a", "discard" => "d", "reject" => "r", "skip" => "s", "none" => ""); - my %sact = ("accept" => "a", + my %sact = ("accept" => "a", "discard" => "d", "reject" => "r", "skip" => "s", "none" => ""); return undef unless open (CONF, $file); @@ -1346,7 +1351,7 @@ sub commit_changes { for my $id (sort { $a <=> $b } keys %{$change}) { my ($what, $text) = @{$change->{$id}}; $params->{$id} = $action->{$what}; - unless ($what =~ /^s[ar]$/) { + unless ($what =~ /^s[ard]$/) { # we don't log subscription approval or rejects $log .= sprintf ("%s D:[%s] F:[%s] S:[%s]\n", $what, |