summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2006-01-15 13:53:53 +0000
committerfukachan <fukachan>2006-01-15 13:53:53 +0000
commit61d91ec06023743d1cf10f10f048b5cbc13d71d4 (patch)
tree2c01cf218d16df97bef6f1581feb0965f3e536c2 /fml/lib/FML/Process
parente3150321fd9909a486b7b324e2c7bebf124ff9ca (diff)
downloadfml8-61d91ec06023743d1cf10f10f048b5cbc13d71d4.tar.gz
fml8-61d91ec06023743d1cf10f10f048b5cbc13d71d4.tar.bz2
fml8-61d91ec06023743d1cf10f10f048b5cbc13d71d4.zip
implement policy_ignore_this_message(), policy_reject_this_message().
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Utils.pm40
1 files changed, 39 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm
index 115df9ec..e5ea2991 100644
--- a/fml/lib/FML/Process/Utils.pm
+++ b/fml/lib/FML/Process/Utils.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: Utils.pm,v 1.144 2006/01/09 14:00:54 fukachan Exp $
+# $FML: Utils.pm,v 1.145 2006/01/13 00:17:08 fukachan Exp $
#
package FML::Process::Utils;
@@ -393,6 +393,44 @@ sub article_message
}
+=head1 OUR POLICY UTILITY
+
+=head2 policy_ignore_this_message($reason)
+
+ignore this message by our policy.
+
+=head2 policy_reject_this_message($reason)
+
+reject this message by our policy. It returns error message to the
+sender.
+
+=cut
+
+
+# Descriptions: ignore this message by our policy.
+# Arguments: OBJ($curproc) STR($reason)
+# Side Effects: none
+# Return Value: none
+sub policy_ignore_this_message
+{
+ my ($curproc, $reason) = @_;
+ $curproc->stop_this_process($reason);
+}
+
+
+# Descriptions: reject this message by our policy.
+# return error message to the sender.
+# Arguments: OBJ($curproc) STR($reason)
+# Side Effects: none
+# Return Value: none
+sub policy_reject_this_message
+{
+ my ($curproc, $reason) = @_;
+ $curproc->stop_this_process($reason);
+ $curproc->reply_message_nl('error.reject', 'reject your message');
+}
+
+
=head1 misc METHODS
=head2 mkdir($dir, $mode)