[prev] [thread] [next] [lurker] [Date index for 2002/09/16]
Update of /cvsroot/siesta/siesta/lib/Siesta/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv6251/lib/Siesta/Plugin Modified Files: Subscribe.pm UnSubscribe.pm Log Message: admin mail notify Index: Subscribe.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/Subscribe.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Subscribe.pm 15 Sep 2002 11:34:06 -0000 1.6 +++ Subscribe.pm 16 Sep 2002 05:26:33 -0000 1.7 @@ -16,12 +16,15 @@ my $user = Siesta::User->new($user_id); - unless ( defined $user ) { + # XXX should this be done implicitly by $list->add_member? + unless ( $user ) { $user = Siesta::User->new_from_hash( id => $user_id ); $user->save(); } if ( $list->add_member($user_id) ) { + $mail->reply( to => $list->owner, + body => "$user_id JOIN " . $list->id ); $mail->reply( body => <<END); Hi, You have been successfully subscribed to ${ \( $list->id ) } @@ -31,6 +34,8 @@ END } else { + $mail->reply( to => $list->owner, + body => "$user_id JOIN FAILED " . $list->id ); $mail->reply( body => <<END); Hi, You could not be subscribed to ${ \( $list->id ) }. @@ -43,14 +48,6 @@ END } return 1; -} - -sub list_config { - return 'Nothing to configure for this plugin.'; -} - -sub user_config { - return 'Nothing to configure for this plugin.'; } 1; Index: UnSubscribe.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/UnSubscribe.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- UnSubscribe.pm 10 Sep 2002 18:24:22 -0000 1.4 +++ UnSubscribe.pm 16 Sep 2002 05:26:33 -0000 1.5 @@ -13,6 +13,9 @@ my $list = $mail->list; if ( $list->remove_member( $mail->from ) ) { + $mail->reply( to => $list->owner, + body => "$user_id LEFT " . $list->id ); + $mail->reply( body => <<END); Hi, You have been sucessfully unsubscribed from ${ \( $list->id ) } @@ -22,6 +25,9 @@ END } else { + $mail->reply( to => $list->owner, + body => "$user_id FAIL LEFT " . $list->id ); + $mail->reply( body => <<END); Hi, You could not be unsubscribed from ${ \( $list->id ) } @@ -34,14 +40,6 @@ END } return 1; -} - -sub list_config { - return 'Nothing to configure for this plugin'; -} - -sub user_config { - return 'Nothing to configure for this plugin'; } 1;
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52