Greetings!
Today I found myself with a list member that was having a really bad day (just got
fired from his job)... I really didn't want to kick him off the list, but needed
the ability to make sure he didn't spout and vent.
I looked into the taboo headers to list his name so that I would have to approve
all his posts, but figured that might be a bit awkward to administer.
So, I just did a bit of hacking into resend and came up with the following patch
(it's a unified patch, I think... so it should be easier for folks to deal with).
Basicly, it implements a new file called <listname>.moderate. Anyone who is
listed in that file will have their posts bounced to the moderator for approval
as if they were a non-zubscriber.
Yes... I relise that there's no way to maintain the ".moderate" file currently...
I'm going to work on that tomorrow... probably implement a "moderate" and
"unmoderate" command in MJ. Password required, of course.
Anyway... here's the patch... let me know what you think.
--- resend.old Sun Nov 2 23:02:13 1997
+++ resend Sun Nov 2 23:18:56 1997
@@ -420,6 +420,7 @@
# same!!
#
$result .= &check_sender if ( defined( $opt_I ) && ! defined ($approved));
+$result .= &check_sender_moderate;
# If approval is required, and we haven't got it, boing it goes..
#
@@ -534,6 +535,31 @@
# Subroutines.
#
######################################################################
+
+# Check to see if the sender should be moderated...
+sub check_sender_moderate {
+ # Uh, who?
+ return " This may be hard to believe, but there was no \"From:\" field" .
+ "in this message I just received. I'm not gonna send it out, " .
+ "but you can... " if ! defined($from);
+
+ # Return a null message if the sender (from the From: or
+ # Reply-To: headers) is found
+ #
+ local($file) = $opt_l . ".moderate";
+ local($fullfile) = $listdir . "/" . $file;
+
+ if (-e $fullfile) {
+ return "$from needs moderation!" if &is_list_member($from, $listdir, $opt_l, $file) ||
+ (defined $reply_to &&
+ $reply_to ne $from &&
+ &is_list_member($reply_to, $listdir, $opt_l, $file));
+ }
+
+ # We only get here if nothing matches.
+ #
+ "";
+}
# check for a valid sender for moderated lists.
#
umidr
|
|