[prev] [thread] [next] [lurker] [Date index for 2002/08/23]
Update of /cvsroot/siesta/siesta/lib/Siesta/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv21299 Modified Files: UnSubscribe.pm Log Message: update for new ->process api Index: UnSubscribe.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/UnSubscribe.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- UnSubscribe.pm 23 Aug 2002 07:30:29 -0000 1.1 +++ UnSubscribe.pm 23 Aug 2002 16:35:47 -0000 1.2 @@ -9,21 +9,22 @@ sub process { my $self = shift; - my %args = @_; - my $mail = $args{mail}; - my $list = $args{list}; + my $mail = shift; + my $list = $mail->list; + if ($list->remove_member($mail->from)) { - $mail->reply("Hi", - "You have been sucessfully unsubscribed from ",$list->id(),".\n", - "Come back soon,\n", - "- Siesta::Plugin::UnSubscribe\n"); - } else { - $mail->reply("Hi", - "You could not be unsubscribed from ",$list->id(),".", - "Maybe you are not a member? You might like to contact ",$list->owner(), - " for more assistance.\n", - "Apologies,\n", - "- Siesta::Plugin::UnSubscribe\n"); + $mail->reply("Hi", + "You have been sucessfully unsubscribed from ",$list->id(),".\n", + "Come back soon,\n", + "- Siesta::Plugin::UnSubscribe\n"); + } + else { + $mail->reply("Hi", + "You could not be unsubscribed from ",$list->id(),".", + "Maybe you are not a member? You might like to contact ",$list->owner(), + " for more assistance.\n", + "Apologies,\n", + "- Siesta::Plugin::UnSubscribe\n"); } return 1; }
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52