summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-10-10 14:50:03 +0000
committerfukachan <fukachan>2001-10-10 14:50:03 +0000
commit7bed78c883e3d511a77411478ffe9fd69e527824 (patch)
tree07fb1ccfaa49fb0fb48f550fcf85a513cc77983a
parent7cacf6b32e227297c40fb95433d85ba916b2bc24 (diff)
downloadfml8-7bed78c883e3d511a77411478ffe9fd69e527824.tar.gz
fml8-7bed78c883e3d511a77411478ffe9fd69e527824.tar.bz2
fml8-7bed78c883e3d511a77411478ffe9fd69e527824.zip
prototype
-rw-r--r--fml/lib/FML/Command/User/subscribe.pm26
1 files changed, 10 insertions, 16 deletions
diff --git a/fml/lib/FML/Command/User/subscribe.pm b/fml/lib/FML/Command/User/subscribe.pm
index f9572ac3..8f2a8034 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.1.1.1 2001/08/26 05:43:10 fukachan Exp $
+# $FML: subscribe.pm,v 1.2 2001/08/26 07:58:39 fukachan Exp $
#
package FML::Command::User::subscribe;
@@ -14,6 +14,7 @@ use Carp;
use ErrorStatus;
use FML::Command::Utils;
+use FML::Log qw(Log LogWarn LogError);
@ISA = qw(FML::Command::Utils ErrorStatus);
@@ -47,23 +48,16 @@ sub process
croak("\$member_map is not specified") unless $member_map;
croak("\$recipient_map is not specified") unless $recipient_map;
- use IO::Adapter;
- my $obj = new IO::Adapter $member_map;
- $obj->touch();
-
use FML::Credential;
+ my $cred = new FML::Credential;
- for my $map ($member_map, $recipient_map) {
- my $cred = new FML::Credential;
- unless ($cred->has_address_in_map($map, $address)) {
- $obj = new IO::Adapter $map;
- $obj->touch();
- $obj->add( $address );
- }
- else {
- $self->error_set( "$address already exists" );
- return undef;
- }
+ # if already member, subscriber request is wrong.
+ if ($cred->is_member($curproc, { address => $address })) {
+ croak("already member");
+ }
+ # if not, try confirmation before subscribe
+ else {
+ Log("new subscriber, try confirmation");
}
}