summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command/UserControl.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-12-23 21:17:29 +0000
committerfukachan <fukachan>2002-12-23 21:17:29 +0000
commitb25a87b36c4b871118b0db97e938d7420b4d06f1 (patch)
tree9ef6a06a4d059fb4faa865e8875c25a666fa2362 /fml/lib/FML/Command/UserControl.pm
parent51e6acef03f17e5547e23a9b38b9b677ed8a5022 (diff)
downloadfml8-b25a87b36c4b871118b0db97e938d7420b4d06f1.tar.gz
fml8-b25a87b36c4b871118b0db97e938d7420b4d06f1.tar.bz2
fml8-b25a87b36c4b871118b0db97e938d7420b4d06f1.zip
fix comments.
cosmetics (sort).
Diffstat (limited to 'fml/lib/FML/Command/UserControl.pm')
-rw-r--r--fml/lib/FML/Command/UserControl.pm22
1 files changed, 18 insertions, 4 deletions
diff --git a/fml/lib/FML/Command/UserControl.pm b/fml/lib/FML/Command/UserControl.pm
index f2765d83..b3bc9d32 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.18 2002/09/11 23:18:06 fukachan Exp $
+# $FML: UserControl.pm,v 1.19 2002/09/22 14:56:43 fukachan Exp $
#
package FML::Command::UserControl;
@@ -16,6 +16,10 @@ use FML::Credential;
use FML::Log qw(Log LogWarn LogError);
use IO::Adapter;
+#
+# XXX-TODO: we use this module to add/del user anywhere.
+#
+
my $debug = 0;
@@ -56,8 +60,12 @@ sub useradd
my $config = $curproc->config();
my $address = $uc_args->{ address };
my $maplist = $uc_args->{ maplist };
- my $msg_args = $command_args->{ msg_args };
my $trycount = 0;
+
+ # XXX-TODO: validate $address by regexp here ?
+
+ # pass info into reply_message()
+ my $msg_args = $command_args->{ msg_args };
$msg_args->{ _arg_address } = $address;
for my $map (@$maplist) {
@@ -67,7 +75,7 @@ sub useradd
$trycount++;
- my $obj = new IO::Adapter $map, $config;
+ my $obj = new IO::Adapter $map, $config;
$obj->touch(); # create a new map entry (e.g. file) if needed.
$obj->add( $address );
unless ($obj->error()) {
@@ -106,8 +114,12 @@ sub userdel
my $config = $curproc->config();
my $address = $uc_args->{ address };
my $maplist = $uc_args->{ maplist };
- my $msg_args = $command_args->{ msg_args };
my $trycount = 0;
+
+ # XXX-TODO: validate $address by regexp here ?
+
+ # pass info to reply_message()
+ my $msg_args = $command_args->{ msg_args };
$msg_args->{ _arg_address } = $address;
for my $map (@$maplist) {
@@ -164,8 +176,10 @@ sub userlist
$obj->open;
while ($x = $obj->get_next_key()) {
if ($style eq 'html') {
+ # XXX-TODO: html-ify address ?
print $wh $x, "<br>\n";
}
+ # we assume text mode by default.
else {
print $wh $x, "\n";
}