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

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

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

Added Files:
	Subscribe.pm 
Log Message:
untested


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

use vars qw( $DESCRIPTION );

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

sub process {
    my $self = shift;
    my %args = @_;
    my $mail = $args{mail};
    my $list = $args{list};
    if ($list->add_member($mail->from)) {
      $mail->reply("Hi",
                   "You have been sucessfully subscribed to ",$list->id(),".\n",
                   "Enjoy,\n",
                   "- Siesta::Plugin::Subscribe\n");
    } else {
      $mail->reply("Hi",
                   "You could not be subscribed to ",$list->id(),".",
                   "Maybe you are already subscribed? You might like to contact ",$list->owner(),
                   " for more assistance.\n",
                   "Apologies,\n",
                   "- Siesta::Plugin::Subscribe\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