diff options
| author | fukachan <fukachan> | 2003-12-30 03:07:54 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-12-30 03:07:54 +0000 |
| commit | bbf2879febd6229727d6f42a7586113c145ef60a (patch) | |
| tree | ed051d184531d44d5e2ab94ec8bd3f00824aa280 /fml/lib/FML/Command/User/on.pm | |
| parent | 60d23319f88e46922fd9e048a016f604f9683d0f (diff) | |
| download | fml8-bbf2879febd6229727d6f42a7586113c145ef60a.tar.gz fml8-bbf2879febd6229727d6f42a7586113c145ef60a.tar.bz2 fml8-bbf2879febd6229727d6f42a7586113c145ef60a.zip | |
update comments on $primary_*_map use.
use $curproc->{ credential } not call "use FML::Credential ...".
Diffstat (limited to 'fml/lib/FML/Command/User/on.pm')
| -rw-r--r-- | fml/lib/FML/Command/User/on.pm | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/fml/lib/FML/Command/User/on.pm b/fml/lib/FML/Command/User/on.pm index 35128b6f..57c54349 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.11 2003/08/29 15:34:00 fukachan Exp $ +# $FML: on.pm,v 1.12 2003/11/22 05:41:51 fukachan Exp $ # package FML::Command::User::on; @@ -70,25 +70,27 @@ sub lock_channel { return 'command_serialize';} sub process { my ($self, $curproc, $command_args) = @_; - my $config = $curproc->config(); - - # - # XXX-TODO: correct to use primary_*_map for on/off ? - # + 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. + # XXX Rewriting of maps not $primary_*_map is + # XXX 1) may be not writable. + # XXX 2) ambigous and dangerous + # XXX since the map is under controlled by other module. + # XXX for example, one of member_maps is under admin_member_maps. my $member_map = $config->{ primary_member_map }; my $recipient_map = $config->{ primary_recipient_map }; my $cache_dir = $config->{ db_dir }; my $keyword = $config->{ confirm_command_prefix }; my $command = $command_args->{ command }; - my $address = $curproc->{ credential }->sender(); + my $address = $cred->sender(); # fundamental check 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. unless ($cred->is_member($address)) { $curproc->reply_message_nl('error.not_member'); |
