diff options
| author | fukachan <fukachan> | 2006-03-04 13:48:28 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-03-04 13:48:28 +0000 |
| commit | 24acfd76bcca6a742dd3d12c07af8e2ae193f430 (patch) | |
| tree | 7c31c02b071e5702427542214385344aa483f3db /fml/lib/FML/Command/User | |
| parent | 80a851d319914b556899769706825eb9a9f5a27b (diff) | |
| download | fml8-24acfd76bcca6a742dd3d12c07af8e2ae193f430.tar.gz fml8-24acfd76bcca6a742dd3d12c07af8e2ae193f430.tar.bz2 fml8-24acfd76bcca6a742dd3d12c07af8e2ae193f430.zip | |
$command_args -> $command_context (OBJ), method style
Diffstat (limited to 'fml/lib/FML/Command/User')
22 files changed, 217 insertions, 217 deletions
diff --git a/fml/lib/FML/Command/User/add.pm b/fml/lib/FML/Command/User/add.pm index a55f0c0b..1a1e2a83 100644 --- a/fml/lib/FML/Command/User/add.pm +++ b/fml/lib/FML/Command/User/add.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: add.pm,v 1.11 2003/12/31 03:49:18 fukachan Exp $ +# $FML: add.pm,v 1.12 2003/12/31 04:08:44 fukachan Exp $ # package FML::Command::User::add; @@ -18,13 +18,13 @@ use FML::Command::User::subscribe; # Descriptions: subscribe request, which forwarded to subscribe module. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: forward request to subscribe module # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; - $self->SUPER::process($curproc, $command_args); + my ($self, $curproc, $command_context) = @_; + $self->SUPER::process($curproc, $command_context); } @@ -51,7 +51,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/admin.pm b/fml/lib/FML/Command/User/admin.pm index 68e5bfd1..56b77bdf 100644 --- a/fml/lib/FML/Command/User/admin.pm +++ b/fml/lib/FML/Command/User/admin.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2003,2004,2005 Ken'ichi Fukamachi +# Copyright (C) 2003,2004,2005,2006 Ken'ichi Fukamachi # 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.14 2005/11/30 23:30:38 fukachan Exp $ +# $FML: admin.pm,v 1.15 2006/03/04 12:56:58 fukachan Exp $ # package FML::Command::User::admin; @@ -41,27 +41,27 @@ sub new # Descriptions: rewrite command prompt. # Always we need to rewrite command prompt to hide password. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) STR_REF($rbuf) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) STR_REF($rbuf) # Side Effects: rewrite buffer to hide the password phrase in $rbuf. # Return Value: none sub rewrite_prompt { - my ($self, $curproc, $command_args, $rbuf) = @_; + my ($self, $curproc, $command_context, $rbuf) = @_; my $command = undef; - my $comname = $command_args->{ comsubname }; + my $comname = $command_context->get_cooked_subcommand(); my $pkg = "FML::Command::Admin::${comname}"; eval qq{ use $pkg; \$command = new $pkg;}; unless ($@) { if ($command->can('rewrite_prompt')) { - return $command->rewrite_prompt($curproc, $command_args, $rbuf); + return $command->rewrite_prompt($curproc, $command_context, $rbuf); } } # XXX-TODO: good style? FML::Command::Admin::password->rewrite_prompt() ? use FML::Command::Admin::password; my $obj = new FML::Command::Admin::password; - $obj->rewrite_prompt($curproc, $command_args, $rbuf); + $obj->rewrite_prompt($curproc, $command_context, $rbuf); } @@ -72,7 +72,7 @@ sub rewrite_prompt sub need_lock { 0;} -=head2 verify_syntax($curproc, $command_args) +=head2 verify_syntax($curproc, $command_context) verify the syntax command string. return 0 if it looks insecure. @@ -81,37 +81,37 @@ return 0 if it looks insecure. # Descriptions: verify the syntax command string. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: NUM(1 or 0) sub verify_syntax { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $command = undef; - my $comname = $command_args->{ comsubname }; + my $comname = $command_context->get_cooked_subcommand(); my $pkg = "FML::Command::Admin::${comname}"; eval qq{ use $pkg; \$command = new $pkg;}; unless ($@) { if ($command->can('verify_syntax')) { - return $command->verify_syntax($curproc, $command_args); + return $command->verify_syntax($curproc, $command_context); } } use FML::Command; my $dispatch = new FML::Command; - return $dispatch->simple_syntax_check($curproc, $command_args); + return $dispatch->simple_syntax_check($curproc, $command_context); } # Descriptions: interface for priviledged command world. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: update authentication state if needed. # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; - my $command = $command_args->{ original_command }; + my ($self, $curproc, $command_context) = @_; + my $command = $command_context->get_command(); # 1. check already authenticated. if not, try auth. # authentication rules are defined as $admin_command_mail_restrictions. @@ -119,7 +119,7 @@ sub process # 1. password auth (one line). # 2. pgp auth (one file). unless ($curproc->command_context_get_admin_auth()) { - my $status = $self->_try_admin_auth($curproc, $command_args); + my $status = $self->_try_admin_auth($curproc, $command_context); if ($status) { $curproc->reply_message_nl("command.admin_auth_ok", "authenticated."); @@ -130,13 +130,13 @@ sub process # 2. run admin command if already authenticated. # if not, fatal error. if ($curproc->command_context_get_admin_auth()) { - my $class = $command_args->{ comsubname } || ''; - $self->_execute_admin_command($curproc, $command_args, $class); + my $class = $command_context->get_cooked_subcommand() || ''; + $self->_execute_admin_command($curproc, $command_context, $class); } else { - my $class = $command_args->{ comsubname } || ''; + my $class = $command_context->get_cooked_subcommand() || ''; my $c = "admin $class ..."; - my $masked_command = $command_args->{ masked_original_command } || $c; + my $masked_command = $command_context->{ masked_original_command } || $c; $curproc->logerror("admin: not auth, cannot run \"$masked_command\""); $curproc->reply_message_nl("command.admin_auth_fail", "not authenticated."); @@ -147,27 +147,27 @@ sub process # Descriptions: authenticate the currrent process sender as an admin. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: NUM(1 or 0) sub _try_admin_auth { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $cred = $curproc->credential(); my $sender = $cred->sender(); my $opt_args = { address => $sender }; - my $class = $command_args->{ comsubname } || ''; + my $class = $command_context->get_cooked_subcommand() || ''; # XXX-TODO: configurable. # prepare() for later use. if ($class eq 'pass' || $class eq 'password') { - $self->_execute_admin_command($curproc, $command_args, $class); + $self->_execute_admin_command($curproc, $command_context, $class); my $p = $curproc->command_context_get_admin_password(); $opt_args->{ password } = $p || ''; } return $self->_apply_new_admin_command_mail_restrictions($curproc, - $command_args, + $command_context, $opt_args); } @@ -175,12 +175,12 @@ sub _try_admin_auth # Descriptions: check if this request is allowed by # $admin_command_mail_restriction. # Arguments: OBJ($self) -# OBJ($curproc) HASH_REF($command_args) HASH_REF($opt_args) +# OBJ($curproc) OBJ($command_context) HASH_REF($opt_args) # Side Effects: none # Return Value: NUM(1 or 0) sub _apply_old_admin_command_mail_restrictions { - my ($self, $curproc, $command_args, $opt_args) = @_; + my ($self, $curproc, $command_context, $opt_args) = @_; my $config = $curproc->config(); my $rules = $config->get_as_array_ref('admin_command_mail_restrictions'); my $is_auth = 0; @@ -212,13 +212,13 @@ sub _apply_old_admin_command_mail_restrictions # Descriptions: check if this request is allowed by # $admin_command_mail_restriction. # Arguments: OBJ($self) -# OBJ($curproc) HASH_REF($command_args) HASH_REF($opt_args) +# OBJ($curproc) OBJ($command_context) HASH_REF($opt_args) # Side Effects: none # Return Value: NUM(1 or 0) sub _apply_new_admin_command_mail_restrictions { - my ($self, $curproc, $command_args, $opt_args) = @_; - my $context = $command_args; + my ($self, $curproc, $command_context, $opt_args) = @_; + my $context = $command_context; my $config = $curproc->config(); my $sender = $opt_args->{ address } || ''; @@ -279,13 +279,13 @@ sub _apply_new_admin_command_mail_restrictions # Descriptions: execute admin command. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) STR($class) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) STR($class) # Side Effects: none # Return Value: none sub _execute_admin_command { - my ($self, $curproc, $command_args, $class) = @_; - my $args = $self->_prepare_command_args($curproc, $command_args); + my ($self, $curproc, $command_context, $class) = @_; + my $args = $self->_prepare_command_args($curproc, $command_context); use FML::Command; my $dispatch = new FML::Command; @@ -293,25 +293,25 @@ sub _execute_admin_command } -# Descriptions: adjust $command_args for admin mode. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Descriptions: adjust $command_context for admin mode. +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: none sub _prepare_command_args { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; - # duplicate $command_args HASH_REF. + # duplicate $command_context HASH_REF. my $args = {}; - for my $k (keys %$command_args) { - $args->{ $k } = $command_args->{ $k }; + for my $k (keys %$command_context) { + $args->{ $k } = $command_context->{ $k }; } $args->{ command_mode } = 'Admin'; # we need to shift "options" by one column in admin command. # e.g. for "admin add some thing", # options = [ add, some, thing ] => [ some, thing ] - my @options = @{ $command_args->{ options } }; + my @options = @{ $command_context->get_options() }; shift @options; $args->{ options } = \@options; @@ -329,7 +329,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2003,2004,2005 Ken'ichi Fukamachi +Copyright (C) 2003,2004,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/bye.pm b/fml/lib/FML/Command/User/bye.pm index 6df155e4..fdde5816 100644 --- a/fml/lib/FML/Command/User/bye.pm +++ b/fml/lib/FML/Command/User/bye.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: bye.pm,v 1.12 2003/12/31 03:55:12 fukachan Exp $ +# $FML: bye.pm,v 1.13 2003/12/31 04:08:44 fukachan Exp $ # package FML::Command::User::bye; @@ -18,13 +18,13 @@ use FML::Command::User::unsubscribe; # Descriptions: unsubscribe request, forwarded to "unsubscribe" module. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: forward request to unsubscribe module # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; - $self->SUPER::process($curproc, $command_args); + my ($self, $curproc, $command_context) = @_; + $self->SUPER::process($curproc, $command_context); } @@ -51,7 +51,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/chaddr.pm b/fml/lib/FML/Command/User/chaddr.pm index 8addc54e..895703d4 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.36 2006/01/08 03:06:59 fukachan Exp $ +# $FML: chaddr.pm,v 1.37 2006/01/09 14:00:54 fukachan Exp $ # package FML::Command::User::chaddr; @@ -28,7 +28,7 @@ processed. After confirmation succeeds, chaddr process proceeds. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) If either old or new addresses in chaddr arguments is an ML member, try to confirm this request. The confirmation is returned to "From:" @@ -65,14 +65,14 @@ sub lock_channel { return 'command_serialize';} # Descriptions: verify the syntax command string. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: NUM(1 or 0) sub verify_syntax { - my ($self, $curproc, $command_args) = @_; - my $comname = $command_args->{ comname } || ''; - my $options = $command_args->{ options } || []; + my ($self, $curproc, $command_context) = @_; + my $comname = $command_context->get_cooked_command() || ''; + my $options = $command_context->get_options() || []; my $command = $comname; my $oldaddr = $options->[ 0 ] || ''; my $newaddr = $options->[ 1 ] || ''; @@ -102,7 +102,7 @@ sub verify_syntax use FML::Command; $dispatch = new FML::Command; - if ($dispatch->safe_regexp_match($curproc, $command_args, \@test)) { + if ($dispatch->safe_regexp_match($curproc, $command_context, \@test)) { $ok++; } @@ -111,13 +111,13 @@ sub verify_syntax # Descriptions: chaddr adapter: confirm before real chaddr operation. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: update database for confirmation. # prepare reply message. # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my $cred = $curproc->credential(); @@ -132,8 +132,8 @@ sub process my $recipient_map = $config->{ primary_recipient_map }; my $cache_dir = $config->{ db_dir }; my $keyword = $config->{ confirm_command_prefix }; - my $comname = $command_args->{ comname }; - my $command = $command_args->{ command }; + my $comname = $command_context->get_cooked_command(); + my $command = $command_context->{ command }; my $sender = $cred->sender(); # cheap sanity checks @@ -146,7 +146,7 @@ sub process # addresses we check and send back confirmation messages to my $optargs = {}; - my $x = $command_args->{ command }; + my $x = $command_context->{ command }; $x =~ s/^.*$comname\s+//; my ($old_addr, $new_addr) = split(/\s+/, $x); $optargs->{ recipient } = [ $sender, $old_addr, $new_addr ]; @@ -193,7 +193,7 @@ sub process command => "chaddr", rm_args => $optargs, }; - $_msg->send_confirmation($curproc, $command_args, $confirm, $sc_args); + $_msg->send_confirmation($curproc, $command_context, $confirm, $sc_args); } # try confirmation before chaddr. else { diff --git a/fml/lib/FML/Command/User/confirm.pm b/fml/lib/FML/Command/User/confirm.pm index ea0d1e12..420cf124 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.37 2006/01/08 03:06:59 fukachan Exp $ +# $FML: confirm.pm,v 1.38 2006/01/09 14:00:54 fukachan Exp $ # package FML::Command::User::confirm; @@ -26,7 +26,7 @@ execute the actual corresponding process if the confirmation succeeds. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -59,12 +59,12 @@ sub lock_channel { return 'command_serialize';} # Descriptions: addresses to inform a message copy to. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: ARREY_REF sub notice_cc_recipient { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my $maintainer = $config->{ maintainer }; @@ -74,12 +74,12 @@ sub notice_cc_recipient # Descriptions: execute the actual process if this confirmation succeeds. # run _switch_command() for real process. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my ($class, $id); @@ -95,7 +95,7 @@ sub process my $cache_dir = $config->{ db_dir }; my $keyword = $config->{ confirm_command_prefix }; my $expire_limit = $config->{ confirm_expire_limit } || 14*24*3600; - my $command = $command_args->{ command }; + my $command = $command_context->{ command }; # XXX-TODO: sanity @@ -127,7 +127,7 @@ sub process $class, $id, $curproc, - $command_args); + $command_context); } else { # if requset is expired $curproc->reply_message_nl('error.expired', "request expired"); @@ -150,12 +150,12 @@ sub process # switch this process to it. # We support only {subscribe,unsubscribe,chaddr} now. # Arguments: OBJ($self) OBJ($confirm) STR($class) STR($id) -# OBJ($curproc) HASH_REF($command_args) +# OBJ($curproc) OBJ($command_context) # Side Effects: module loaded # Return Value: none sub _switch_process { - my ($self, $confirm, $class, $id, $curproc, $command_args) = @_; + my ($self, $confirm, $class, $id, $curproc, $command_context) = @_; my $config = $curproc->config(); my $command = $class; my $varname = "${command}_command_operation_mode"; @@ -164,29 +164,29 @@ sub _switch_process my $request = $confirm->get_request($id); # pass confirmation id to the command layer. - $command_args->{ _confirm_id } = $id; - $command_args->{ _confirm_address } = $address; - $command_args->{ _confirm_request } = $request; + $command_context->{ _confirm_id } = $id; + $command_context->{ _confirm_address } = $address; + $command_context->{ _confirm_request } = $request; # 1. XXX_command_operation_mode == automatic # fml8 do subscription et.al. automatically. if ($mode eq 'automatic') { - $self->_switch_command($class, $address, $curproc, $command_args); + $self->_switch_command($class, $address, $curproc, $command_context); } # 2. XXX_command_operation_mode == manual # notify "the request is confirmed" to $maintainer, # who do actual subscription et.al. elsif ($mode eq 'manual') { - $self->_forward_request($class, $address, $curproc, $command_args); + $self->_forward_request($class, $address, $curproc, $command_context); } else { croak("unknown operation mode"); } # clean up. - delete $command_args->{ _confirm_id }; - delete $command_args->{ _confirm_address }; - delete $command_args->{ _confirm_request }; + delete $command_context->{ _confirm_id }; + delete $command_context->{ _confirm_address }; + delete $command_context->{ _confirm_request }; } @@ -194,12 +194,12 @@ sub _switch_process # switch this process to it. # We support only {subscribe,unsubscribe,chaddr} now. # Arguments: OBJ($self) STR($class) STR($address) -# OBJ($curproc) HASH_REF($command_args) +# OBJ($curproc) OBJ($command_context) # Side Effects: module loaded # Return Value: none sub _switch_command { - my ($self, $class, $address, $curproc, $command_args) = @_; + my ($self, $class, $address, $curproc, $command_context) = @_; # lower case $class =~ tr/A-Z/a-z/; @@ -215,10 +215,10 @@ sub _switch_command $class eq 'on' || $class eq 'off' || $class eq 'moderate') { - $command_args->{ command_data } = $address; - $command_args->{ command_mode } = 'Admin'; - $command_args->{ override_need_no_lock } = 1; # already locked - $obj->$class($curproc, $command_args); + $command_context->{ command_data } = $address; + $command_context->{ command_mode } = 'Admin'; + $command_context->{ override_need_no_lock } = 1; # already locked + $obj->$class($curproc, $command_context); } else { $curproc->logerror("no such confirmation rule for '$class' command"); @@ -241,7 +241,7 @@ sub _switch_command $config->set( 'welcome_file', $file ); if (-f $file) { - $self->send_user_xxx_message($curproc, $command_args, "welcome"); + $self->send_user_xxx_message($curproc, $command_context, "welcome"); } } @@ -256,18 +256,18 @@ sub _switch_command # switch this process to it. # We support only {subscribe,unsubscribe,chaddr} now. # Arguments: OBJ($self) STR($class) STR($address) -# OBJ($curproc) HASH_REF($command_args) +# OBJ($curproc) OBJ($command_context) # Side Effects: module loaded # Return Value: none sub _forward_request { - my ($self, $class, $address, $curproc, $command_args) = @_; + my ($self, $class, $address, $curproc, $command_context) = @_; my $msg = $curproc->incoming_message(); my $config = $curproc->config(); my $maintainer = $config->{ maintainer }; my $action = "?"; my $command = $class; - my $request = $command_args->{ _confirm_request }; + my $request = $command_context->{ _confirm_request }; my (@address) = split(/\s+/, $address); my $user_args = { recipient => \@address }; my $rm_args = { diff --git a/fml/lib/FML/Command/User/deny.pm b/fml/lib/FML/Command/User/deny.pm index 5b2b51cf..9bb8e43c 100644 --- a/fml/lib/FML/Command/User/deny.pm +++ b/fml/lib/FML/Command/User/deny.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi # 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.12 2004/04/23 04:15:58 fukachan Exp $ +# $FML: deny.pm,v 1.13 2004/06/26 11:47:57 fukachan Exp $ # package FML::Command::User::deny; @@ -29,7 +29,7 @@ See C<FML::Command> for more details. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -55,14 +55,14 @@ sub need_lock { 0;} # Descriptions: send deny message via FML::Command::SendFile. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; - $self->send_user_xxx_message($curproc, $command_args, "deny"); + $self->send_user_xxx_message($curproc, $command_context, "deny"); } @@ -76,7 +76,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/digest.pm b/fml/lib/FML/Command/User/digest.pm index 4a946339..584b4c4c 100644 --- a/fml/lib/FML/Command/User/digest.pm +++ b/fml/lib/FML/Command/User/digest.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2002,2003,2004,2005 MURASHITA Takuya +# Copyright (C) 2002,2003,2004,2005,2006 MURASHITA Takuya # 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.16 2005/11/30 23:34:45 fukachan Exp $ +# $FML: digest.pm,v 1.17 2005/12/16 13:15:23 fukachan Exp $ # package FML::Command::User::digest; @@ -27,7 +27,7 @@ change delivery mode among real time and digest. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -60,13 +60,13 @@ sub lock_channel { return 'command_serialize';} # Descriptions: digest off/on adapter. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: update database for confirmation. # prepare reply message. # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my $cred = $curproc->credential(); @@ -81,7 +81,7 @@ sub process 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 $command = $command_context->{ command }; my $address = $cred->sender(); my $mode = ''; @@ -107,16 +107,16 @@ sub process $curproc->log("digest $mode"); # emulate options ARRAY_REF. - $command_args->{ command_data } = $address; - $command_args->{ options }->[0] = $address; - $command_args->{ options }->[1] = $mode; + $command_context->{ command_data } = $address; + $command_context->get_options()->[0] = $address; + $command_context->get_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); + $obj->process($curproc, $command_context); } else { my $r = "digest: unknown mode: $mode"; @@ -141,7 +141,7 @@ MURASHITA Takuya =head1 COPYRIGHT -Copyright (C) 2002,2003,2004,2005 MURASHITA Takuya +Copyright (C) 2002,2003,2004,2005,2006 MURASHITA Takuya All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/get.pm b/fml/lib/FML/Command/User/get.pm index 975669ba..2181e41e 100644 --- a/fml/lib/FML/Command/User/get.pm +++ b/fml/lib/FML/Command/User/get.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003,2004,2005 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi # 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.23 2004/06/26 11:47:58 fukachan Exp $ +# $FML: get.pm,v 1.24 2005/05/27 03:03:35 fukachan Exp $ # package FML::Command::User::get; @@ -60,20 +60,20 @@ sub lock_channel { return 'article_spool_modify';} # Descriptions: check the limit specific to this command. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: NUM(1 or 0) sub check_limit { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my $pcb = $curproc->pcb(); my $total = $pcb->get('command', 'get_command_total_num_request') || 0; # 1. check the number of article in one command. my $limit = $config->{ get_command_request_limit } || 10; - my $nreq = $self->num_files_in_send_article_args($curproc, $command_args); - my $name = $command_args->{ comname }; + my $nreq = $self->num_files_in_send_article_args($curproc, $command_context); + my $name = $command_context->get_cooked_command(); my $_args = { _arg_command => $name, }; # 1.1 total number of requested articles. @@ -107,17 +107,17 @@ sub check_limit # command syntax. $options is raw command as ARRAY_REF such as # $options = [ 'get:3', 1, 100 ]; # send_article() called below can parse MH style argument. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; # call send_article() without checking here but # Mail::Message::MH checks and expands the specified targets # to HASH_ARRAY of numbers: [ \d+, \d+, ... ]. - $self->send_article($curproc, $command_args); + $self->send_article($curproc, $command_context); } @@ -131,7 +131,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003,2004,2005 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/guide.pm b/fml/lib/FML/Command/User/guide.pm index a81eeafb..8d5944f4 100644 --- a/fml/lib/FML/Command/User/guide.pm +++ b/fml/lib/FML/Command/User/guide.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi # 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.16 2004/04/23 04:15:58 fukachan Exp $ +# $FML: guide.pm,v 1.17 2004/06/26 11:47:58 fukachan Exp $ # package FML::Command::User::guide; @@ -30,7 +30,7 @@ See C<FML::Command> for more details. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -56,14 +56,14 @@ sub need_lock { 0;} # Descriptions: send guide message via FML::Command::SendFile. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; - $self->send_user_xxx_message($curproc, $command_args, "guide"); + $self->send_user_xxx_message($curproc, $command_context, "guide"); } @@ -77,7 +77,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/help.pm b/fml/lib/FML/Command/User/help.pm index 8df16112..00f96d67 100644 --- a/fml/lib/FML/Command/User/help.pm +++ b/fml/lib/FML/Command/User/help.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi # 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.20 2004/04/23 04:15:58 fukachan Exp $ +# $FML: help.pm,v 1.21 2004/06/26 11:47:58 fukachan Exp $ # package FML::Command::User::help; @@ -30,7 +30,7 @@ See C<FML::Command> for more details. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -56,14 +56,14 @@ sub need_lock { 0;} # Descriptions: send help message via FML::Command::SendFile. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; - $self->send_user_xxx_message($curproc, $command_args, "help"); + $self->send_user_xxx_message($curproc, $command_context, "help"); } @@ -77,7 +77,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/info.pm b/fml/lib/FML/Command/User/info.pm index a22d916c..a708a7b8 100644 --- a/fml/lib/FML/Command/User/info.pm +++ b/fml/lib/FML/Command/User/info.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: info.pm,v 1.9 2003/12/31 03:49:18 fukachan Exp $ +# $FML: info.pm,v 1.10 2003/12/31 04:08:44 fukachan Exp $ # package FML::Command::User::info; @@ -18,13 +18,13 @@ use FML::Command::User::guide; # Descriptions: send back guide file -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: forward request to guide module # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; - $self->SUPER::process($curproc, $command_args); + my ($self, $curproc, $command_context) = @_; + $self->SUPER::process($curproc, $command_context); } @@ -51,7 +51,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/mget.pm b/fml/lib/FML/Command/User/mget.pm index 470fc81a..e7b3ff6e 100644 --- a/fml/lib/FML/Command/User/mget.pm +++ b/fml/lib/FML/Command/User/mget.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: mget.pm,v 1.13 2003/12/31 03:49:18 fukachan Exp $ +# $FML: mget.pm,v 1.14 2003/12/31 04:08:44 fukachan Exp $ # package FML::Command::User::mget; @@ -18,13 +18,13 @@ use FML::Command::User::get; # Descriptions: send back article(s). # The request is forwarded to "get" module. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: forward request to get module # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; - $self->SUPER::process($curproc, $command_args); + my ($self, $curproc, $command_context) = @_; + $self->SUPER::process($curproc, $command_context); } @@ -51,7 +51,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/objective.pm b/fml/lib/FML/Command/User/objective.pm index a1c59396..2a52ef62 100644 --- a/fml/lib/FML/Command/User/objective.pm +++ b/fml/lib/FML/Command/User/objective.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi # 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.12 2004/04/23 04:15:58 fukachan Exp $ +# $FML: objective.pm,v 1.13 2004/06/26 11:47:58 fukachan Exp $ # package FML::Command::User::objective; @@ -29,7 +29,7 @@ See C<FML::Command> for more details. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -55,14 +55,14 @@ sub need_lock { 0;} # Descriptions: send back objective message via FML::Command::SendFile. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; - $self->send_user_xxx_message($curproc, $command_args, "objective"); + $self->send_user_xxx_message($curproc, $command_context, "objective"); } @@ -76,7 +76,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/off.pm b/fml/lib/FML/Command/User/off.pm index 7a784da1..f45753f2 100644 --- a/fml/lib/FML/Command/User/off.pm +++ b/fml/lib/FML/Command/User/off.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2002,2003,2004,2005 MURASHITA Takuya +# Copyright (C) 2002,2003,2004,2005,2006 MURASHITA Takuya # 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.19 2005/11/30 23:30:38 fukachan Exp $ +# $FML: off.pm,v 1.20 2005/11/30 23:34:45 fukachan Exp $ # package FML::Command::User::off; @@ -28,7 +28,7 @@ succeeds. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -62,13 +62,13 @@ sub lock_channel { return 'command_serialize';} # Descriptions: change delivery mode from real time to digest # after confirmation succeeds. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: update database for confirmation. # prepare reply message. # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my $cred = $curproc->credential(); @@ -83,7 +83,7 @@ sub process 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 $command = $command_context->{ command }; my $address = $cred->sender(); # cheap sanity checks @@ -133,7 +133,7 @@ MURASHITA Takuya =head1 COPYRIGHT -Copyright (C) 2002,2003,2004,2005 MURASHITA Takuya +Copyright (C) 2002,2003,2004,2005,2006 MURASHITA Takuya All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/on.pm b/fml/lib/FML/Command/User/on.pm index fb873ebc..2e9df071 100644 --- a/fml/lib/FML/Command/User/on.pm +++ b/fml/lib/FML/Command/User/on.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2002,2003,2004,2005 MURASHITA Takuya +# Copyright (C) 2002,2003,2004,2005,2006 MURASHITA Takuya # 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.19 2005/11/30 23:30:38 fukachan Exp $ +# $FML: on.pm,v 1.20 2005/11/30 23:34:45 fukachan Exp $ # package FML::Command::User::on; @@ -28,7 +28,7 @@ After confirmation succeeds, on process proceeds. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -62,13 +62,13 @@ sub lock_channel { return 'command_serialize';} # Descriptions: change delivery mode from digest to real time # after confirmation. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: update database for confirmation. # prepare reply message. # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my $cred = $curproc->credential(); @@ -83,7 +83,7 @@ sub process 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 $command = $command_context->{ command }; my $address = $cred->sender(); # fundamental check @@ -135,7 +135,7 @@ MURASHITA Takuya =head1 COPYRIGHT -Copyright (C) 2002,2003,2004,2005 MURASHITA Takuya +Copyright (C) 2002,2003,2004,2005,2006 MURASHITA Takuya All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/remove.pm b/fml/lib/FML/Command/User/remove.pm index 8a23384f..1d5806c4 100644 --- a/fml/lib/FML/Command/User/remove.pm +++ b/fml/lib/FML/Command/User/remove.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: remove.pm,v 1.12 2003/12/31 03:49:18 fukachan Exp $ +# $FML: remove.pm,v 1.13 2003/12/31 04:08:44 fukachan Exp $ # package FML::Command::User::remove; @@ -18,13 +18,13 @@ use FML::Command::User::unsubscribe; # Descriptions: unsubscribe request, forwarded to "unsubscribe" module. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: forward request to unsubscribe module # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; - $self->SUPER::process($curproc, $command_args); + my ($self, $curproc, $command_context) = @_; + $self->SUPER::process($curproc, $command_context); } @@ -51,7 +51,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/resign.pm b/fml/lib/FML/Command/User/resign.pm index 65f09cc4..5cd9f4b2 100644 --- a/fml/lib/FML/Command/User/resign.pm +++ b/fml/lib/FML/Command/User/resign.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: resign.pm,v 1.12 2003/12/31 03:49:18 fukachan Exp $ +# $FML: resign.pm,v 1.13 2003/12/31 04:08:44 fukachan Exp $ # package FML::Command::User::resign; @@ -18,13 +18,13 @@ use FML::Command::User::unsubscribe; # Descriptions: unsubscribe request, forwarded to "unsubscribe" module. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: forward request to unsubscribe module # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; - $self->SUPER::process($curproc, $command_args); + my ($self, $curproc, $command_context) = @_; + $self->SUPER::process($curproc, $command_context); } =head1 NAME @@ -50,7 +50,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/send.pm b/fml/lib/FML/Command/User/send.pm index 4b646028..1f4fc9ca 100644 --- a/fml/lib/FML/Command/User/send.pm +++ b/fml/lib/FML/Command/User/send.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: send.pm,v 1.12 2003/12/31 03:49:18 fukachan Exp $ +# $FML: send.pm,v 1.13 2003/12/31 04:08:45 fukachan Exp $ # package FML::Command::User::send; @@ -17,13 +17,13 @@ use FML::Command::User::get; # Descriptions: send back article(s) -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: forward request to get module # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; - $self->SUPER::process($curproc, $command_args); + my ($self, $curproc, $command_context) = @_; + $self->SUPER::process($curproc, $command_context); } @@ -50,7 +50,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/signoff.pm b/fml/lib/FML/Command/User/signoff.pm index aa568281..39f64391 100644 --- a/fml/lib/FML/Command/User/signoff.pm +++ b/fml/lib/FML/Command/User/signoff.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: signoff.pm,v 1.13 2003/12/31 03:49:18 fukachan Exp $ +# $FML: signoff.pm,v 1.14 2003/12/31 04:08:45 fukachan Exp $ # package FML::Command::User::signoff; @@ -18,13 +18,13 @@ use FML::Command::User::unsubscribe; # Descriptions: unsubscribe request, forwarded to "unsubscribe" command. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: forward request to unsubscribe module # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; - $self->SUPER::process($curproc, $command_args); + my ($self, $curproc, $command_context) = @_; + $self->SUPER::process($curproc, $command_context); } @@ -51,7 +51,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/subscribe.pm b/fml/lib/FML/Command/User/subscribe.pm index 431324fa..f663010b 100644 --- a/fml/lib/FML/Command/User/subscribe.pm +++ b/fml/lib/FML/Command/User/subscribe.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: subscribe.pm,v 1.35 2006/01/07 14:43:25 fukachan Exp $ +# $FML: subscribe.pm,v 1.36 2006/01/08 03:06:59 fukachan Exp $ # package FML::Command::User::subscribe; @@ -28,7 +28,7 @@ After confirmation succeeds, subcribe process proceeds. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -62,13 +62,13 @@ sub lock_channel { return 'command_serialize';} # Descriptions: subscribe adapter. # we confirm it before real subscribe process. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: update database for confirmation. # prepare reply message. # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my $cred = $curproc->credential(); @@ -83,8 +83,8 @@ sub process 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 $options = $command_args->{ options }; + my $command = $command_context->{ command }; + my $options = $command_context->get_options(); my $cui_options = $curproc->command_line_cui_specific_options() || {}; my $address = $cui_options->{ 'send-to' } || $cred->sender(); @@ -131,7 +131,7 @@ sub process use FML::Command::Message; my $_msg = new FML::Command::Message; my $sc_args = { command => "subscribe" }; - $_msg->send_confirmation($curproc, $command_args, $confirm, $sc_args); + $_msg->send_confirmation($curproc, $command_context, $confirm, $sc_args); } } diff --git a/fml/lib/FML/Command/User/summary.pm b/fml/lib/FML/Command/User/summary.pm index bdfdf218..776a0fbc 100644 --- a/fml/lib/FML/Command/User/summary.pm +++ b/fml/lib/FML/Command/User/summary.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +# Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi # 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.20 2004/04/23 04:15:58 fukachan Exp $ +# $FML: summary.pm,v 1.21 2004/06/26 11:43:42 fukachan Exp $ # package FML::Command::User::summary; @@ -30,7 +30,7 @@ send back summary file. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -63,19 +63,19 @@ sub lock_channel { return 'article_spool_modify';} # Descriptions: send summary file by FML::Command::SendFile. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: none # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my $article_summary_file = $config->{ "article_summary_file" }; if (-f $article_summary_file) { - $command_args->{ _filepath_to_send } = $article_summary_file; - $self->send_file($curproc, $command_args); - delete $command_args->{ _filepath_to_send }; + $command_context->{ _filepath_to_send } = $article_summary_file; + $self->send_file($curproc, $command_context); + delete $command_context->{ _filepath_to_send }; } else { $curproc->reply_message_nl('error.no_such_file', @@ -97,7 +97,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2001,2002,2003,2004 Ken'ichi Fukamachi +Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Command/User/unsubscribe.pm b/fml/lib/FML/Command/User/unsubscribe.pm index 726b6ed4..87e1a045 100644 --- a/fml/lib/FML/Command/User/unsubscribe.pm +++ b/fml/lib/FML/Command/User/unsubscribe.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: unsubscribe.pm,v 1.36 2006/01/07 14:43:25 fukachan Exp $ +# $FML: unsubscribe.pm,v 1.37 2006/01/08 03:06:59 fukachan Exp $ # package FML::Command::User::unsubscribe; @@ -28,7 +28,7 @@ After confirmation succeeds, unsubcribe process proceeds. =head1 METHODS -=head2 process($curproc, $command_args) +=head2 process($curproc, $command_context) =cut @@ -61,13 +61,13 @@ sub lock_channel { return 'command_serialize';} # Descriptions: unsubscribe adapter: confirm before unsubscribe. -# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) +# Arguments: OBJ($self) OBJ($curproc) OBJ($command_context) # Side Effects: update database for confirmation. # prepare reply message. # Return Value: none sub process { - my ($self, $curproc, $command_args) = @_; + my ($self, $curproc, $command_context) = @_; my $config = $curproc->config(); my $cred = $curproc->credential(); @@ -82,8 +82,8 @@ sub process 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 $options = $command_args->{ options }; + my $command = $command_context->{ command }; + my $options = $command_context->get_options(); my $cui_options = $curproc->command_line_cui_specific_options() || {}; my $address = $cui_options->{ 'send-to' } || $cred->sender(); @@ -128,7 +128,7 @@ sub process use FML::Command::Message; my $_msg = new FML::Command::Message; my $sc_args = { command => "unsubscribe" }; - $_msg->send_confirmation($curproc, $command_args, $confirm, $sc_args); + $_msg->send_confirmation($curproc, $command_context, $confirm, $sc_args); } } |
