summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-04-23 14:10:33 +0000
committerfukachan <fukachan>2002-04-23 14:10:33 +0000
commitfe7cc80cfab61920f6cbe84ac8a30dfdd1717c1d (patch)
treec6b045fba6dea408feb22d7d8e63cf35f81d501a /fml/lib
parent6a928c653cd770e1993c40afb9d8b45dbb87d051 (diff)
downloadfml8-fe7cc80cfab61920f6cbe84ac8a30dfdd1717c1d.tar.gz
fml8-fe7cc80cfab61920f6cbe84ac8a30dfdd1717c1d.tar.bz2
fml8-fe7cc80cfab61920f6cbe84ac8a30dfdd1717c1d.zip
fix errro message and enable the rejected message forwarding
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Process/Distribute.pm27
-rw-r--r--fml/lib/FML/Process/Kernel.pm8
2 files changed, 31 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 622029bb..78b77a96 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.72 2002/04/18 05:11:23 fukachan Exp $
+# $FML: Distribute.pm,v 1.73 2002/04/18 15:36:30 fukachan Exp $
#
package FML::Process::Distribute;
@@ -174,9 +174,30 @@ sub run
$curproc->_distribute($args);
}
else {
- $curproc->reply_message_nl("error.system_accounts",
- "deny request from system accounts");
+ my $pcb = $curproc->{ pcb };
+
Log("deny article submission");
+
+ my $rule = $pcb->get("check_restrictions", "deny_reason");
+ if ($rule eq 'reject_system_accounts') {
+ my $r = "deny request from a system account";
+ $curproc->reply_message_nl("error.system_accounts", $r);
+ }
+ elsif ($rule eq 'permit_members_only') {
+ my $r = "deny request from a not member";
+ $curproc->reply_message_nl("error.not_member", $r);
+ }
+ elsif ($rule eq 'reject') {
+ my $r = "deny all requests";
+ $curproc->reply_message_nl("error.reject", $r);
+ }
+ else {
+ my $r = "deny your request due to an unknown reason";
+ $curproc->reply_message_nl("error.reject_post", $r);
+ }
+
+ my $msg = $curproc->{ incoming_message }->{ message };
+ $curproc->reply_message( $msg );
}
}
else {
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index 2c11b5b3..27635804 100644
--- a/fml/lib/FML/Process/Kernel.pm
+++ b/fml/lib/FML/Process/Kernel.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Kernel.pm,v 1.85 2002/04/13 14:54:51 fukachan Exp $
+# $FML: Kernel.pm,v 1.86 2002/04/15 03:46:44 fukachan Exp $
#
package FML::Process::Kernel;
@@ -532,6 +532,9 @@ sub _check_resitrictions
$curproc->reply_message_nl('kern.not_member',
"you are not a ML member." );
$curproc->reply_message( " your address: $sender" );
+
+ $pcb->set("check_restrictions", "deny_reason", $rule);
+ return 0;
}
}
elsif ($rule eq 'reject') {
@@ -542,6 +545,9 @@ sub _check_resitrictions
LogWarn("unknown rule=$rule");
}
}
+
+ # deny by default
+ return 0;
}