summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command
diff options
context:
space:
mode:
authorfukachan <fukachan>2006-10-08 06:06:47 +0000
committerfukachan <fukachan>2006-10-08 06:06:47 +0000
commitf198d6e20329bbe0ac747052f38341ace20d2d79 (patch)
treeaaa3b4363ae52f8629a29cf66c4f4c8032bf8db0 /fml/lib/FML/Command
parent9c2fdd615846737d388d728cc441aa99a9435389 (diff)
downloadfml8-f198d6e20329bbe0ac747052f38341ace20d2d79.tar.gz
fml8-f198d6e20329bbe0ac747052f38341ace20d2d79.tar.bz2
fml8-f198d6e20329bbe0ac747052f38341ace20d2d79.zip
bug fix comments.
Diffstat (limited to 'fml/lib/FML/Command')
-rw-r--r--fml/lib/FML/Command/User/admin.pm25
-rw-r--r--fml/lib/FML/Command/User/chaddr.pm22
-rw-r--r--fml/lib/FML/Command/User/confirm.pm23
-rw-r--r--fml/lib/FML/Command/User/deny.pm20
-rw-r--r--fml/lib/FML/Command/User/digest.pm20
-rw-r--r--fml/lib/FML/Command/User/get.pm22
-rw-r--r--fml/lib/FML/Command/User/guide.pm20
-rw-r--r--fml/lib/FML/Command/User/help.pm20
-rw-r--r--fml/lib/FML/Command/User/objective.pm20
-rw-r--r--fml/lib/FML/Command/User/off.pm27
-rw-r--r--fml/lib/FML/Command/User/on.pm25
-rw-r--r--fml/lib/FML/Command/User/summary.pm21
12 files changed, 246 insertions, 19 deletions
diff --git a/fml/lib/FML/Command/User/admin.pm b/fml/lib/FML/Command/User/admin.pm
index 2d08a3ba..7762f738 100644
--- a/fml/lib/FML/Command/User/admin.pm
+++ b/fml/lib/FML/Command/User/admin.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: admin.pm,v 1.19 2006/03/06 12:11:59 fukachan Exp $
+# $FML: admin.pm,v 1.20 2006/05/04 06:48:49 fukachan Exp $
#
package FML::Command::User::admin;
@@ -23,6 +23,28 @@ See C<FML::Command> for more details.
=head1 DESCRIPTION
+=head1 METHODS
+
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
+=head2 process($curproc, $command_context)
+
+main command specific routine.
+
=cut
@@ -223,6 +245,7 @@ sub _apply_new_admin_command_mail_restrictions
my $sender = $opt_args->{ address } || '';
unless ($config->yes('use_admin_command_mail_function')) {
+ # XXX-TODO: return error message "admin command prohibited."
$curproc->logerror("admin command prohibited.");
return 0;
}
diff --git a/fml/lib/FML/Command/User/chaddr.pm b/fml/lib/FML/Command/User/chaddr.pm
index 01d19314..5c09293a 100644
--- a/fml/lib/FML/Command/User/chaddr.pm
+++ b/fml/lib/FML/Command/User/chaddr.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: chaddr.pm,v 1.38 2006/03/04 13:48:29 fukachan Exp $
+# $FML: chaddr.pm,v 1.39 2006/03/05 08:08:37 fukachan Exp $
#
package FML::Command::User::chaddr;
@@ -28,6 +28,22 @@ processed. After confirmation succeeds, chaddr process proceeds.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
If either old or new addresses in chaddr arguments is an ML member,
@@ -71,8 +87,8 @@ sub lock_channel { return 'command_serialize';}
sub verify_syntax
{
my ($self, $curproc, $command_context) = @_;
- my $comname = $command_context->get_cooked_command() || '';
- my $options = $command_context->get_options() || [];
+ my $comname = $command_context->get_cooked_command() || '';
+ my $options = $command_context->get_options() || [];
my $command = $comname;
my $oldaddr = $options->[ 0 ] || '';
my $newaddr = $options->[ 1 ] || '';
diff --git a/fml/lib/FML/Command/User/confirm.pm b/fml/lib/FML/Command/User/confirm.pm
index b684ad67..a5b5be2b 100644
--- a/fml/lib/FML/Command/User/confirm.pm
+++ b/fml/lib/FML/Command/User/confirm.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: confirm.pm,v 1.41 2006/05/02 11:23:55 fukachan Exp $
+# $FML: confirm.pm,v 1.42 2006/05/04 06:47:44 fukachan Exp $
#
package FML::Command::User::confirm;
@@ -26,8 +26,26 @@ execute the actual corresponding process if the confirmation succeeds.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
+main command specific routine.
+
=cut
@@ -164,6 +182,7 @@ sub _switch_process
my $address = $confirm->get_address($id);
my $request = $confirm->get_request($id);
+ # XXX-TODO: method-ify
# pass confirmation id to the command layer.
$command_context->{ _confirm_id } = $id;
$command_context->{ _confirm_address } = $address;
@@ -265,6 +284,8 @@ sub _forward_request
my $key1 = 'command.forward_request_to_admin';
my $key2 = 'command.receive_confirmed_request';
+ # XXX-TODO: default meesage is correct ?
+
# 2.1 notify "forwarded request to maintainer(s)." to sender(s).
$curproc->reply_message_nl($key1, "", $user_args);
diff --git a/fml/lib/FML/Command/User/deny.pm b/fml/lib/FML/Command/User/deny.pm
index 9bb8e43c..a2282882 100644
--- a/fml/lib/FML/Command/User/deny.pm
+++ b/fml/lib/FML/Command/User/deny.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: deny.pm,v 1.13 2004/06/26 11:47:57 fukachan Exp $
+# $FML: deny.pm,v 1.14 2006/03/04 13:48:29 fukachan Exp $
#
package FML::Command::User::deny;
@@ -29,8 +29,26 @@ See C<FML::Command> for more details.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
+main command specific routine.
+
=cut
diff --git a/fml/lib/FML/Command/User/digest.pm b/fml/lib/FML/Command/User/digest.pm
index 5cffdde7..f06258b0 100644
--- a/fml/lib/FML/Command/User/digest.pm
+++ b/fml/lib/FML/Command/User/digest.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: digest.pm,v 1.18 2006/03/04 13:48:29 fukachan Exp $
+# $FML: digest.pm,v 1.19 2006/03/05 08:08:37 fukachan Exp $
#
package FML::Command::User::digest;
@@ -27,8 +27,26 @@ change delivery mode among real time and digest.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
+main command specific routine.
+
=cut
diff --git a/fml/lib/FML/Command/User/get.pm b/fml/lib/FML/Command/User/get.pm
index 99a6ea79..1ea68f22 100644
--- a/fml/lib/FML/Command/User/get.pm
+++ b/fml/lib/FML/Command/User/get.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: get.pm,v 1.26 2006/04/16 06:33:36 fukachan Exp $
+# $FML: get.pm,v 1.27 2006/07/09 12:11:12 fukachan Exp $
#
package FML::Command::User::get;
@@ -29,6 +29,26 @@ send back article(s).
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
+=head2 process($curproc, $command_context)
+
+main command specific routine.
+
=cut
diff --git a/fml/lib/FML/Command/User/guide.pm b/fml/lib/FML/Command/User/guide.pm
index 8d5944f4..32d81acb 100644
--- a/fml/lib/FML/Command/User/guide.pm
+++ b/fml/lib/FML/Command/User/guide.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: guide.pm,v 1.17 2004/06/26 11:47:58 fukachan Exp $
+# $FML: guide.pm,v 1.18 2006/03/04 13:48:29 fukachan Exp $
#
package FML::Command::User::guide;
@@ -30,8 +30,26 @@ See C<FML::Command> for more details.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
+main command specific routine.
+
=cut
diff --git a/fml/lib/FML/Command/User/help.pm b/fml/lib/FML/Command/User/help.pm
index 00f96d67..0995f82f 100644
--- a/fml/lib/FML/Command/User/help.pm
+++ b/fml/lib/FML/Command/User/help.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: help.pm,v 1.21 2004/06/26 11:47:58 fukachan Exp $
+# $FML: help.pm,v 1.22 2006/03/04 13:48:29 fukachan Exp $
#
package FML::Command::User::help;
@@ -30,8 +30,26 @@ See C<FML::Command> for more details.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
+main command specific routine.
+
=cut
diff --git a/fml/lib/FML/Command/User/objective.pm b/fml/lib/FML/Command/User/objective.pm
index 2a52ef62..226ef487 100644
--- a/fml/lib/FML/Command/User/objective.pm
+++ b/fml/lib/FML/Command/User/objective.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: objective.pm,v 1.13 2004/06/26 11:47:58 fukachan Exp $
+# $FML: objective.pm,v 1.14 2006/03/04 13:48:29 fukachan Exp $
#
package FML::Command::User::objective;
@@ -29,8 +29,26 @@ See C<FML::Command> for more details.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
+main command specific routine.
+
=cut
diff --git a/fml/lib/FML/Command/User/off.pm b/fml/lib/FML/Command/User/off.pm
index 208e4525..99e19250 100644
--- a/fml/lib/FML/Command/User/off.pm
+++ b/fml/lib/FML/Command/User/off.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: off.pm,v 1.21 2006/03/04 13:48:29 fukachan Exp $
+# $FML: off.pm,v 1.22 2006/03/05 08:08:37 fukachan Exp $
#
package FML::Command::User::off;
@@ -15,7 +15,7 @@ use Carp;
=head1 NAME
-FML::Command::User::off - change delivery mode from real time to digest.
+FML::Command::User::off - disable real time delivery.
=head1 SYNOPSIS
@@ -23,13 +23,32 @@ See C<FML::Command> for more details.
=head1 DESCRIPTION
-change delivery mode from real time to digest after confirmation
-succeeds.
+"off" command disables real time delivery,
+so fml8 does not deliver articles to him/her.
+After confirmation succeeds, on process proceeds.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
+main command specific routine.
+
=cut
diff --git a/fml/lib/FML/Command/User/on.pm b/fml/lib/FML/Command/User/on.pm
index 79d3d456..6e3becd3 100644
--- a/fml/lib/FML/Command/User/on.pm
+++ b/fml/lib/FML/Command/User/on.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: on.pm,v 1.21 2006/03/04 13:48:29 fukachan Exp $
+# $FML: on.pm,v 1.22 2006/03/05 08:08:37 fukachan Exp $
#
package FML::Command::User::on;
@@ -15,7 +15,7 @@ use Carp;
=head1 NAME
-FML::Command::User::on - change delivery mode from digest to real time.
+FML::Command::User::on - enable real time delivery.
=head1 SYNOPSIS
@@ -23,13 +23,32 @@ See C<FML::Command> for more details.
=head1 DESCRIPTION
-"on" command changes delivery mode from digest to real time.
+"on" command enables real time delivery,
+so fml8 delivers articles to him/her again.
After confirmation succeeds, on process proceeds.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
+main command specific routine.
+
=cut
diff --git a/fml/lib/FML/Command/User/summary.pm b/fml/lib/FML/Command/User/summary.pm
index 776a0fbc..564753d4 100644
--- a/fml/lib/FML/Command/User/summary.pm
+++ b/fml/lib/FML/Command/User/summary.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: summary.pm,v 1.21 2004/06/26 11:43:42 fukachan Exp $
+# $FML: summary.pm,v 1.22 2006/03/04 13:48:29 fukachan Exp $
#
package FML::Command::User::summary;
@@ -30,8 +30,26 @@ send back summary file.
=head1 METHODS
+=head2 new()
+
+constructor.
+
+=head2 need_lock()
+
+need lock or not.
+
+=head2 lock_channel()
+
+return lock channel name.
+
+=head2 verify_syntax($curproc, $command_context)
+
+provide command specific syntax checker.
+
=head2 process($curproc, $command_context)
+main command specific routine.
+
=cut
@@ -73,6 +91,7 @@ sub process
my $article_summary_file = $config->{ "article_summary_file" };
if (-f $article_summary_file) {
+ # XXX-TODO: method-fiy
$command_context->{ _filepath_to_send } = $article_summary_file;
$self->send_file($curproc, $command_context);
delete $command_context->{ _filepath_to_send };