summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-08-23 07:24:40 +0000
committerfukachan <fukachan>2003-08-23 07:24:40 +0000
commit9723a7a408f11cf8beaf8f618d2863c2f3e28ddb (patch)
treedd4b1e0ae8d32873a0a289d5ba2a7cf01a2cc3ad /fml/lib/FML/Command
parent1757df2907216e1ab833c05ac8a2757f0b6a67e7 (diff)
downloadfml8-9723a7a408f11cf8beaf8f618d2863c2f3e28ddb.tar.gz
fml8-9723a7a408f11cf8beaf8f618d2863c2f3e28ddb.tar.bz2
fml8-9723a7a408f11cf8beaf8f618d2863c2f3e28ddb.zip
define $curproc->log, logwarn, logerror and log_message() methods.
modified to use $curproc->log*() interface.
Diffstat (limited to 'fml/lib/FML/Command')
-rw-r--r--fml/lib/FML/Command/Admin/chaddr.pm4
-rw-r--r--fml/lib/FML/Command/Admin/changepassword.pm4
-rw-r--r--fml/lib/FML/Command/Admin/get.pm6
-rw-r--r--fml/lib/FML/Command/Admin/list.pm4
-rw-r--r--fml/lib/FML/Command/Auth.pm18
-rw-r--r--fml/lib/FML/Command/DirUtils.pm10
-rw-r--r--fml/lib/FML/Command/FileUtils.pm10
-rw-r--r--fml/lib/FML/Command/Filter.pm6
-rw-r--r--fml/lib/FML/Command/HTMLify.pm4
-rw-r--r--fml/lib/FML/Command/SendFile.pm10
-rw-r--r--fml/lib/FML/Command/User/chaddr.pm4
-rw-r--r--fml/lib/FML/Command/User/confirm.pm8
-rw-r--r--fml/lib/FML/Command/User/digest.pm10
-rw-r--r--fml/lib/FML/Command/User/get.pm6
-rw-r--r--fml/lib/FML/Command/User/off.pm8
-rw-r--r--fml/lib/FML/Command/User/on.pm6
-rw-r--r--fml/lib/FML/Command/User/subscribe.pm4
-rw-r--r--fml/lib/FML/Command/User/unsubscribe.pm6
-rw-r--r--fml/lib/FML/Command/UserControl.pm24
19 files changed, 76 insertions, 76 deletions
diff --git a/fml/lib/FML/Command/Admin/chaddr.pm b/fml/lib/FML/Command/Admin/chaddr.pm
index c047c4cc..50306b64 100644
--- a/fml/lib/FML/Command/Admin/chaddr.pm
+++ b/fml/lib/FML/Command/Admin/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.16 2003/05/12 10:16:42 fukachan Exp $
+# $FML: chaddr.pm,v 1.17 2003/08/23 04:35:30 fukachan Exp $
#
package FML::Command::Admin::chaddr;
@@ -85,7 +85,7 @@ sub process
$new_address = $options->[ 1 ];
}
- Log("chaddr: $old_address -> $new_address");
+ $curproc->log("chaddr: $old_address -> $new_address");
# sanity check
unless ($old_address && $new_address) {
diff --git a/fml/lib/FML/Command/Admin/changepassword.pm b/fml/lib/FML/Command/Admin/changepassword.pm
index 0dd5793b..bc778b9a 100644
--- a/fml/lib/FML/Command/Admin/changepassword.pm
+++ b/fml/lib/FML/Command/Admin/changepassword.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: changepassword.pm,v 1.5 2003/05/12 10:16:42 fukachan Exp $
+# $FML: changepassword.pm,v 1.6 2003/08/23 04:35:30 fukachan Exp $
#
package FML::Command::Admin::changepassword;
@@ -105,7 +105,7 @@ sub process
$self->_change_password($curproc, $command_args, $address, $password);
}
else {
- LogError("myname=$myname unknown program");
+ $curproc->logerror("myname=$myname unknown program");
}
}
diff --git a/fml/lib/FML/Command/Admin/get.pm b/fml/lib/FML/Command/Admin/get.pm
index 59ac655e..7d447040 100644
--- a/fml/lib/FML/Command/Admin/get.pm
+++ b/fml/lib/FML/Command/Admin/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.18 2003/03/18 10:35:13 fukachan Exp $
+# $FML: get.pm,v 1.19 2003/03/18 10:52:35 fukachan Exp $
#
package FML::Command::Admin::get;
@@ -78,7 +78,7 @@ sub process
# XXX-TODO: we expect send_file() validates ${filename,filepath}.
if (-f $filepath) {
- Log("send back $filename");
+ $curproc->log("send back $filename");
$command_args->{ _filename_to_send } = $filename;
$command_args->{ _filepath_to_send } = $filepath;
@@ -89,7 +89,7 @@ sub process
delete $command_args->{ _filepath_to_send };
}
else {
- Log("$filename not found");
+ $curproc->log("$filename not found");
$curproc->reply_message_nl('error.no_such_file',
"no such file $filename",
{
diff --git a/fml/lib/FML/Command/Admin/list.pm b/fml/lib/FML/Command/Admin/list.pm
index 33391222..1f22e838 100644
--- a/fml/lib/FML/Command/Admin/list.pm
+++ b/fml/lib/FML/Command/Admin/list.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: list.pm,v 1.12 2003/01/26 03:14:17 fukachan Exp $
+# $FML: list.pm,v 1.13 2003/01/27 00:02:41 fukachan Exp $
#
package FML::Command::Admin::list;
@@ -92,7 +92,7 @@ sub _show_list
$maplist = $config->get_as_array_ref( 'admin_member_maps' );
}
else {
- LogWarn("list: unknown type $option");
+ $curproc->logwarn("list: unknown type $option");
}
}
diff --git a/fml/lib/FML/Command/Auth.pm b/fml/lib/FML/Command/Auth.pm
index df833689..8392fdbf 100644
--- a/fml/lib/FML/Command/Auth.pm
+++ b/fml/lib/FML/Command/Auth.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: Auth.pm,v 1.25 2003/03/28 10:32:21 fukachan Exp $
+# $FML: Auth.pm,v 1.26 2003/05/12 10:16:41 fukachan Exp $
#
package FML::Command::Auth;
@@ -86,7 +86,7 @@ sub permit_admin_member_maps
my $match = $cred->is_privileged_member($sender);
if ($match) {
- Log("found in admin_member_maps");
+ $curproc->log("found in admin_member_maps");
return 1;
}
@@ -106,7 +106,7 @@ sub reject_system_accounts
my $match = $cred->match_system_accounts($sender);
if ($match) {
- Log("reject_system_accounts: matches the sender");
+ $curproc->log("reject_system_accounts: matches the sender");
return '__LAST__';
}
@@ -180,7 +180,7 @@ sub check_admin_member_password
# 1.2 password match ?
if ($p_infile eq $p_input) {
if ($debug) {
- Log("check_admin_member_password: password match");
+ $curproc->log("check_admin_member_password: password match");
}
$status = 1;
last PASSWORD_ENTRY;
@@ -192,7 +192,7 @@ sub check_admin_member_password
$curproc->unlock($lock_channel);
- LogWarn("check_admin_member_password: password not match") unless $status;
+ $curproc->logwarn("check_admin_member_password: password not match") unless $status;
return $status;
}
@@ -237,20 +237,20 @@ sub change_password
if ($obj->find( $address )) {
$obj->delete( $address );
if ($obj->error()) {
- LogError("cannot delete $address from=$map");
+ $curproc->logerror("cannot delete $address from=$map");
}
else {
- Log("delete $address from=$map");
+ $curproc->log("delete $address from=$map");
}
}
# add
$obj->add( $address, [ $cp, "UNIX_CRYPT" ] ) && $status++;
if ($obj->error()) {
- LogError("cannot add $address to=$map");
+ $curproc->logerror("cannot add $address to=$map");
}
else {
- Log("add password for $address to=$map");
+ $curproc->log("add password for $address to=$map");
}
$obj->close();
diff --git a/fml/lib/FML/Command/DirUtils.pm b/fml/lib/FML/Command/DirUtils.pm
index b083c5ec..f1b00a77 100644
--- a/fml/lib/FML/Command/DirUtils.pm
+++ b/fml/lib/FML/Command/DirUtils.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: DirUtils.pm,v 1.12 2003/01/25 09:14:05 fukachan Exp $
+# $FML: DirUtils.pm,v 1.13 2003/01/26 03:11:27 fukachan Exp $
#
package FML::Command::DirUtils;
@@ -71,7 +71,7 @@ sub dir
$opt_ls = $opt;
}
else {
- LogWarn("deny ls options '$opt'");
+ $curproc->logwarn("deny ls options '$opt'");
}
}
@@ -92,7 +92,7 @@ sub dir
if (-x $path_ls) {
my $eval = "$path_ls $opt_ls $y";
- Log("dir: run \"$eval\"");
+ $curproc->log("dir: run \"$eval\"");
use FileHandle;
my $fh = new FileHandle "$eval|";
@@ -102,11 +102,11 @@ sub dir
$fh->close();
}
else {
- LogError("tail to run '$eval'");
+ $curproc->logerror("tail to run '$eval'");
}
}
else {
- LogError("\$path_ls is not found");
+ $curproc->logerror("\$path_ls is not found");
croak("\$path_ls is not found");
}
}
diff --git a/fml/lib/FML/Command/FileUtils.pm b/fml/lib/FML/Command/FileUtils.pm
index 81941090..b3aaa121 100644
--- a/fml/lib/FML/Command/FileUtils.pm
+++ b/fml/lib/FML/Command/FileUtils.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: FileUtils.pm,v 1.11 2003/01/25 09:14:05 fukachan Exp $
+# $FML: FileUtils.pm,v 1.12 2003/02/09 12:31:41 fukachan Exp $
#
package FML::Command::FileUtils;
@@ -98,18 +98,18 @@ sub remove
unlink $file;
if (-f $file) {
- LogError("fail to remove $file");
+ $curproc->logerror("fail to remove $file");
$is_error++;
}
else {
- Log("remove $file");
+ $curproc->log("remove $file");
$curproc->reply_message_nl("command.remove_file",
"removed $file",
{ _arg_file => $file } );
}
}
else {
- LogWarn("no such file $file");
+ $curproc->logwarn("no such file $file");
$curproc->reply_message_nl("command.no_such_file",
"no such file $file",
{ _arg_file => $file } );
@@ -118,7 +118,7 @@ sub remove
}
# $file filename is unsafe. stop.
else {
- LogError("<$file> is insecure");
+ $curproc->logerror("<$file> is insecure");
$curproc->reply_message_nl('command.insecure',
"insecure input");
croak("remove: insecure argument");
diff --git a/fml/lib/FML/Command/Filter.pm b/fml/lib/FML/Command/Filter.pm
index 3dbd3af1..3b56eecc 100644
--- a/fml/lib/FML/Command/Filter.pm
+++ b/fml/lib/FML/Command/Filter.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$
+# $FML: Filter.pm,v 1.1 2003/06/22 16:05:14 fukachan Exp $
#
package FML::Command::Filter;
@@ -81,7 +81,7 @@ sub check_command_limit
}
if ( $count > $limit ) {
- Log("command_limit: $count > $limit");
+ $curproc->log("command_limit: $count > $limit");
}
my $r = "number of commands per mail exceeds limit $limit";
@@ -112,7 +112,7 @@ sub check_line_length_limit
}
if ($match) {
- Log("line_length_limit: $match times (\$len > $limit)");
+ $curproc->log("line_length_limit: $match times (\$len > $limit)");
}
my $r = "too long command (> $limit bytes)\n";
diff --git a/fml/lib/FML/Command/HTMLify.pm b/fml/lib/FML/Command/HTMLify.pm
index 34762031..4bcfc92b 100644
--- a/fml/lib/FML/Command/HTMLify.pm
+++ b/fml/lib/FML/Command/HTMLify.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: HTMLify.pm,v 1.16 2003/02/16 08:33:09 fukachan Exp $
+# $FML: HTMLify.pm,v 1.17 2003/07/19 12:58:48 fukachan Exp $
#
package FML::Command::HTMLify;
@@ -74,7 +74,7 @@ sub convert
};
my ($is_subdir_exists, $subdirs) = _check_subdir_exists($src_dir);
- if ($is_subdir_exists) { Log("looks subdir exists");}
+ if ($is_subdir_exists) { $curproc->log("looks subdir exists");}
if (defined $dst_dir) {
unless (-d $dst_dir) {
diff --git a/fml/lib/FML/Command/SendFile.pm b/fml/lib/FML/Command/SendFile.pm
index 6a9aa30c..30631ab6 100644
--- a/fml/lib/FML/Command/SendFile.pm
+++ b/fml/lib/FML/Command/SendFile.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: SendFile.pm,v 1.28 2003/06/29 05:48:12 fukachan Exp $
+# $FML: SendFile.pm,v 1.29 2003/08/23 04:35:29 fukachan Exp $
#
package FML::Command::SendFile;
@@ -101,7 +101,7 @@ sub send_article
my $article = new FML::Article $curproc;
my $filepath = $article->filepath($filename);
if (-f $filepath) {
- Log("send back article $filename");
+ $curproc->log("send back article $filename");
$curproc->reply_message( {
type => "message/rfc822; charset=$charset",
path => $filepath,
@@ -116,13 +116,13 @@ sub send_article
_arg_article => $filename,
}
);
- Log("no such file: $filepath");
+ $curproc->log("no such file: $filepath");
}
}
}
# invalid argument
else {
- LogError("send_article: invalid argument $fn");
+ $curproc->logerror("send_article: invalid argument $fn");
$is_error = 1;
}
}
@@ -182,7 +182,7 @@ sub send_file
my $charset = $config->{ reply_message_charset };
# XXX-TODO: who validate $filename and $filepath ?
- Log("send_file: $filepath");
+ $curproc->log("send_file: $filepath");
# template substitution: kanji code, $varname expansion et. al.
# we prepare file to send back which has proper kanji code et.al.
diff --git a/fml/lib/FML/Command/User/chaddr.pm b/fml/lib/FML/Command/User/chaddr.pm
index 0692437b..7a7c254b 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.19 2003/03/18 10:42:44 fukachan Exp $
+# $FML: chaddr.pm,v 1.20 2003/08/23 04:35:32 fukachan Exp $
#
package FML::Command::User::chaddr;
@@ -112,7 +112,7 @@ sub process
# 1. request from $old_addr : $old_addr (member now) -> $new_addr
# 2. request from $new_addr : $old_addr -> $new_addr (member now)
if ($cred->is_member($old_addr) || $cred->is_member($new_addr)) {
- Log("chaddr request, try confirmation");
+ $curproc->log("chaddr request, try confirmation");
# XXX-TODO: should be FML::Confirm { ... address => [ @addr ] } ?
use FML::Confirm;
diff --git a/fml/lib/FML/Command/User/confirm.pm b/fml/lib/FML/Command/User/confirm.pm
index 6a5f57aa..18c00da4 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.21 2003/03/18 10:42:44 fukachan Exp $
+# $FML: confirm.pm,v 1.22 2003/08/23 04:35:33 fukachan Exp $
#
package FML::Command::User::confirm;
@@ -118,7 +118,7 @@ sub process
}
else { # if requset is expired
$curproc->reply_message_nl('error.expired', "request expired");
- LogError("request expired");
+ $curproc->logerror("request expired");
croak("request is expired");
}
}
@@ -127,7 +127,7 @@ sub process
$curproc->reply_message_nl('error.no_such_confirmation',
"no such confirmatoin request id=$id",
{ _arg_id => $id });
- LogError("no such confirmation request id=$id");
+ $curproc->logerror("no such confirmation request id=$id");
croak("no such confirmation request id=$id");
}
}
@@ -162,7 +162,7 @@ sub _switch_command
$obj->$class($curproc, $command_args);
}
else {
- LogError("no such rule confirm for '$class' command");
+ $curproc->logerror("no such rule confirm for '$class' command");
$curproc->reply_message_nl('error.no_such_confirmation_for_command',
"no such confirmation for command $class",
{ _arg_command => $class });
diff --git a/fml/lib/FML/Command/User/digest.pm b/fml/lib/FML/Command/User/digest.pm
index cab3457a..cdb9a227 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.5 2003/03/18 10:52:34 fukachan Exp $
+# $FML: digest.pm,v 1.6 2003/08/23 04:35:33 fukachan Exp $
#
package FML::Command::User::digest;
@@ -91,7 +91,7 @@ sub process
# if not member, "on" request is wrong.
unless ($cred->is_member($address)) {
$curproc->reply_message_nl('error.not_member');
- LogError("digest request from not member");
+ $curproc->logerror("digest request from not member");
croak("digest request from not member");
return;
}
@@ -101,7 +101,7 @@ sub process
}
if ($mode) {
- Log("digest $mode");
+ $curproc->log("digest $mode");
$command_args->{ command_data } = $address;
$command_args->{ options }->[0] = $address;
@@ -113,12 +113,12 @@ sub process
$obj->process($curproc, $command_args);
}
else {
- LogError("unknown digest mode");
+ $curproc->logerror("unknown digest mode");
croak("no such digest mode: off or on");
}
}
else {
- LogError("digest: mode not specified");
+ $curproc->logerror("digest: mode not specified");
croak("digest: mode not specified");
}
}
diff --git a/fml/lib/FML/Command/User/get.pm b/fml/lib/FML/Command/User/get.pm
index 30a64438..f787292d 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.16 2003/03/18 10:42:44 fukachan Exp $
+# $FML: get.pm,v 1.17 2003/06/29 05:48:12 fukachan Exp $
#
package FML::Command::User::get;
@@ -90,14 +90,14 @@ sub check_limit
$curproc->reply_message_nl('command.exceed_total_request_limit',
'total requests exceed limit',
$_args);
- LogError("get command limit: total=$total_num_req > $limit");
+ $curproc->logerror("get command limit: total=$total_num_req > $limit");
return $nreq;
}
elsif ($nreq > $limit) {
$curproc->reply_message_nl('command.exceed_request_limit',
'requests exceed limit',
$_args);
- LogError("get command limit: $nreq > $limit");
+ $curproc->logerror("get command limit: $nreq > $limit");
return $nreq;
}
else {
diff --git a/fml/lib/FML/Command/User/off.pm b/fml/lib/FML/Command/User/off.pm
index 2b0f0fef..70bd2d90 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.8 2003/03/18 10:52:34 fukachan Exp $
+# $FML: off.pm,v 1.9 2003/08/23 04:35:33 fukachan Exp $
#
package FML::Command::User::off;
@@ -92,7 +92,7 @@ sub process
# if not member, off request is wrong.
unless ($cred->is_member($address)) {
$curproc->reply_message_nl('error.not_member');
- LogError("off request from not member");
+ $curproc->logerror("off request from not member");
croak("off request from not member");
return;
}
@@ -100,12 +100,12 @@ sub process
# if not recipient, off request is wrong.
unless ($cred->is_recipient($address)) {
$curproc->reply_message_nl('error.not_recipient');
- LogError("off request from not recipient");
+ $curproc->logerror("off request from not recipient");
croak("off request from not recipient");
}
# try confirmation before off
else {
- Log("off request, try confirmation");
+ $curproc->log("off request, try confirmation");
use FML::Confirm;
my $confirm = new FML::Confirm {
diff --git a/fml/lib/FML/Command/User/on.pm b/fml/lib/FML/Command/User/on.pm
index e4ccf73d..f9b7695c 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.8 2003/03/18 10:52:34 fukachan Exp $
+# $FML: on.pm,v 1.9 2003/08/23 04:35:33 fukachan Exp $
#
package FML::Command::User::on;
@@ -92,7 +92,7 @@ sub process
# if not member, on request is wrong.
unless ($cred->is_member($address)) {
$curproc->reply_message_nl('error.not_member');
- LogError("on request from not member");
+ $curproc->logerror("on request from not member");
croak("on request from not member");
return;
}
@@ -108,7 +108,7 @@ sub process
}
# if not, try confirmation before on
else {
- Log("on request, try confirmation");
+ $curproc->log("on request, try confirmation");
use FML::Confirm;
my $confirm = new FML::Confirm {
keyword => $keyword,
diff --git a/fml/lib/FML/Command/User/subscribe.pm b/fml/lib/FML/Command/User/subscribe.pm
index eea78644..68cd28dc 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.19 2003/03/18 10:42:44 fukachan Exp $
+# $FML: subscribe.pm,v 1.20 2003/08/23 04:35:33 fukachan Exp $
#
package FML::Command::User::subscribe;
@@ -101,7 +101,7 @@ sub process
}
# if not, try confirmation before subscribe
else {
- Log("new subscriber, try confirmation");
+ $curproc->log("new subscriber, try confirmation");
use FML::Confirm;
my $confirm = new FML::Confirm {
keyword => $keyword,
diff --git a/fml/lib/FML/Command/User/unsubscribe.pm b/fml/lib/FML/Command/User/unsubscribe.pm
index f35e4be6..b771333d 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.19 2003/03/18 10:42:44 fukachan Exp $
+# $FML: unsubscribe.pm,v 1.20 2003/08/23 04:35:33 fukachan Exp $
#
package FML::Command::User::unsubscribe;
@@ -93,12 +93,12 @@ sub process
# if not member, unsubscriber request is wrong.
unless ($cred->is_member($address)) {
$curproc->reply_message_nl('error.not_member');
- LogError("unsubscribe request from not member");
+ $curproc->logerror("unsubscribe request from not member");
croak("unsubscribe request from not member");
}
# try confirmation before unsubscribe
else {
- Log("unsubscribe request, try confirmation");
+ $curproc->log("unsubscribe request, try confirmation");
use FML::Confirm;
my $confirm = new FML::Confirm {
diff --git a/fml/lib/FML/Command/UserControl.pm b/fml/lib/FML/Command/UserControl.pm
index 10c4699f..1f6e41ba 100644
--- a/fml/lib/FML/Command/UserControl.pm
+++ b/fml/lib/FML/Command/UserControl.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: UserControl.pm,v 1.31 2003/03/23 15:57:52 fukachan Exp $
+# $FML: UserControl.pm,v 1.32 2003/03/28 10:32:21 fukachan Exp $
#
package FML::Command::UserControl;
@@ -103,7 +103,7 @@ sub useradd
$obj->touch(); # create a new map entry (e.g. file) if needed.
$obj->add( $address );
unless ($obj->error()) {
- Log("add $address to map=$_map");
+ $curproc->log("add $address to map=$_map");
$curproc->reply_message_nl('command.add_ok',
"$address added.",
$msg_args);
@@ -128,7 +128,7 @@ sub useradd
}
unless ($trycount) {
- LogError("no trail to add $address");
+ $curproc->logerror("no trail to add $address");
}
}
@@ -184,7 +184,7 @@ sub userdel
my $obj = new IO::Adapter $map, $config;
$obj->delete( $address_in_map );
unless ($obj->error()) {
- Log("remove $address from map=$_map");
+ $curproc->log("remove $address from map=$_map");
$curproc->reply_message_nl('command.del_ok',
"$address removed.",
$msg_args);
@@ -198,7 +198,7 @@ sub userdel
}
}
else {
- LogWarn("no such user in map=$_map") if $debug;
+ $curproc->logwarn("no such user in map=$_map") if $debug;
}
}
@@ -208,7 +208,7 @@ sub userdel
}
unless ($trycount) {
- LogError("no trail to remove $address");
+ $curproc->logerror("no trail to remove $address");
}
}
@@ -273,7 +273,7 @@ sub _try_chaddr_in_map
$is_new_address_ok = 1;
}
else {
- LogError("$new_address is already member (map=$map)");
+ $curproc->logerror("$new_address is already member (map=$map)");
return 0;
}
@@ -296,10 +296,10 @@ sub _try_chaddr_in_map
$obj->open();
$obj->add( $new_address );
unless ($obj->error()) {
- Log("add $new_address to map=$map");
+ $curproc->log("add $new_address to map=$map");
}
else {
- LogError("fail to add $new_address to map=$map");
+ $curproc->logerror("fail to add $new_address to map=$map");
}
$obj->close();
}
@@ -313,10 +313,10 @@ sub _try_chaddr_in_map
$obj->open();
$obj->delete( $old_address_in_map );
unless ($obj->error()) {
- Log("delete $old_address from map=$map");
+ $curproc->log("delete $old_address from map=$map");
}
else {
- LogError("fail to delete $old_address to map=$map");
+ $curproc->logerror("fail to delete $old_address to map=$map");
}
$obj->close();
}
@@ -358,7 +358,7 @@ sub userlist
$obj->close;
}
else {
- LogWarn("canot open $map");
+ $curproc->logwarn("canot open $map");
}
}