diff options
| author | fukachan <fukachan> | 2003-12-31 04:04:39 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-12-31 04:04:39 +0000 |
| commit | b25cf8fe6b2dc6dc50f5b0fe33252821e759cb03 (patch) | |
| tree | 6452db4e5ba771432e456e9266a8e3e6a9d189f5 /fml/lib/FML/Command/User/digest.pm | |
| parent | ac8ee575e893f31c4b49f1847608806466ac4841 (diff) | |
| download | fml8-b25cf8fe6b2dc6dc50f5b0fe33252821e759cb03.tar.gz fml8-b25cf8fe6b2dc6dc50f5b0fe33252821e759cb03.tar.bz2 fml8-b25cf8fe6b2dc6dc50f5b0fe33252821e759cb03.zip | |
update comments/messages.
use $curproc->{ credential }
Diffstat (limited to 'fml/lib/FML/Command/User/digest.pm')
| -rw-r--r-- | fml/lib/FML/Command/User/digest.pm | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/fml/lib/FML/Command/User/digest.pm b/fml/lib/FML/Command/User/digest.pm index 40293687..c4f38a4e 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.8 2003/08/29 15:34:00 fukachan Exp $ +# $FML: digest.pm,v 1.9 2003/12/30 03:07:54 fukachan Exp $ # package FML::Command::User::digest; @@ -24,7 +24,7 @@ See C<FML::Command> for more details. =head1 DESCRIPTION -digest mode change on or off +change delivery mode among real time and digest. =head1 METHODS @@ -68,7 +68,8 @@ sub lock_channel { return 'command_serialize';} sub process { my ($self, $curproc, $command_args) = @_; - my $config = $curproc->config(); + my $config = $curproc->config(); + my $cred = $curproc->{ credential }; # XXX We should always add/rewrite only $primary_*_map maps via # XXX command mail, CUI and GUI. @@ -89,10 +90,9 @@ sub process croak("\$member_map is not specified") unless $member_map; croak("\$recipient_map is not specified") unless $recipient_map; - use FML::Credential; - my $cred = new FML::Credential $curproc; - - # if not member, "on" request is wrong. + # 1. check if the sender is a member or not. + # if not member, "on" request is wrong. + # 2. not check if the sender is a recipient or not in this stage. unless ($cred->is_member($address)) { $curproc->reply_message_nl('error.not_member'); $curproc->logerror("digest request from not member"); @@ -107,17 +107,20 @@ sub process if ($mode) { $curproc->log("digest $mode"); + # emulate options ARRAY_REF. $command_args->{ command_data } = $address; $command_args->{ options }->[0] = $address; $command_args->{ options }->[1] = $mode; + # XXX-TODO: direct call of Admin::digest is correct? + # XXX-TODO: confirmation ? use FML::Command::Admin::digest; my $obj = new FML::Command::Admin::digest; if ($mode eq "on" || $mode eq 'off') { $obj->process($curproc, $command_args); } else { - $curproc->logerror("unknown digest mode"); + $curproc->logerror("unknown digest mode: $mode"); croak("no such digest mode: off or on"); } } |
