[siesta-commit] siesta/lib/Siesta/Plugin UnSubscribe.pm,NONE,1.1

[prev] [thread] [next] [lurker] [Date index for 2002/08/23]

From: gmccarroll
Subject: [siesta-commit] siesta/lib/Siesta/Plugin UnSubscribe.pm,NONE,1.1
Date: 08:30 on 23 Aug 2002
Update of /cvsroot/siesta/siesta/lib/Siesta/Plugin
In directory usw-pr-cvs1:/tmp/cvs-serv30703

Added Files:
	UnSubscribe.pm 
Log Message:

UNTESTED


--- NEW FILE: UnSubscribe.pm ---
package Siesta::Plugin::UnSubscribe;
use strict;
use Siesta::Plugin;
use base 'Siesta::Plugin';

use vars qw( $DESCRIPTION );

$DESCRIPTION = 'A system plugin used for unsubscribing a member to the list';

sub process {
    my $self = shift;
    my %args = @_;
    my $mail = $args{mail};
    my $list = $args{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");
    }
    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