[siesta-commit] siesta/lib/Siesta/Plugin MembersOnly.pm,1.8,1.9 SimpleSig.pm,1.10,1.11 Subscribe.pm,1.2,1.3 UnSubscribe.pm,1.2,1.3

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

From: clampr
Subject: [siesta-commit] siesta/lib/Siesta/Plugin MembersOnly.pm,1.8,1.9 SimpleSig.pm,1.10,1.11 Subscribe.pm,1.2,1.3 UnSubscribe.pm,1.2,1.3
Date: 18:34 on 26 Aug 2002
Update of /cvsroot/siesta/siesta/lib/Siesta/Plugin
In directory usw-pr-cvs1:/tmp/cvs-serv12574/lib/Siesta/Plugin

Modified Files:
	MembersOnly.pm SimpleSig.pm Subscribe.pm UnSubscribe.pm 
Log Message:
change the imagined api of reply (implementing it next)

Index: MembersOnly.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/MembersOnly.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- MembersOnly.pm	23 Aug 2002 14:26:38 -0000	1.8
+++ MembersOnly.pm	26 Aug 2002 17:34:52 -0000	1.9
@@ -12,11 +12,15 @@
 
     return if $mail->list->is_member( $mail->from );
     # I'm not even supposed to be here today.
-    $mail->reply("Hi,\n",
-                 "Non-member posting is disabled for this list, and\n",
-                 "you don't appear to be a subscriber\n",
-                 "\n",
-                 "- Siesta::Plugin::MembersOnly");
+    $mail->reply(body => <<END);
+Hi,
+
+Non-member posting is disabled for this list, and you don't
+appear to be a subscriber
+
+- Siesta::Plugin::MembersOnly
+END
+
     return 1;
 }
 

Index: SimpleSig.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/SimpleSig.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- SimpleSig.pm	25 Aug 2002 14:18:18 -0000	1.10
+++ SimpleSig.pm	26 Aug 2002 17:34:52 -0000	1.11
@@ -25,11 +25,14 @@
 
     my (@lines) = split /\n/, $sig;
     if (scalar(@lines) > $maxlines + 1) {
-        # reply should do the wrapping
-        $mail->reply("Hi,\n",
-                     $list->owner()," has set this list to have a maximum .sig length of $maxlines, hence your mail has been rejected,\n",
-                     "Have a nice day,\n",
-                     "- Siesta::Plugin::SimpleSig");
+        $mail->reply(body => <<END);
+Hi, 
+${ \( $list->owner ) } has set this list to have a maximum .sig length
+of $maxlines lines, hence your mail has been rejected,
+
+Have a nice day,
+- Siesta::Plugin::SimpleSig
+END
         return 1;
     }
     return 0;

Index: Subscribe.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/Subscribe.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Subscribe.pm	23 Aug 2002 16:33:48 -0000	1.2
+++ Subscribe.pm	26 Aug 2002 17:34:52 -0000	1.3
@@ -13,18 +13,25 @@
     my $list = $mail->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");
+        $mail->reply(body => <<END);
+Hi,
+ You have been successfully subscribed to ${ \( $list->id ) }
+
+Enjoy,
+- Siesta::Plugin::Subscribe
+END
     }
     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");
+        $mail->reply(body => <<END);
+Hi,
+ You could not be subscribed to ${ \( $list->id ) }.
+
+Maybe you are already subscribed?  You might like to contact
+the list owner, ${ \( $list->owner ) }, for more assistance.
+
+Apologies,
+ - Siesta::Plugin::Subscribe
+END
     }
     return 1;
 }

Index: UnSubscribe.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/UnSubscribe.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- UnSubscribe.pm	23 Aug 2002 16:35:47 -0000	1.2
+++ UnSubscribe.pm	26 Aug 2002 17:34:52 -0000	1.3
@@ -13,18 +13,25 @@
     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");
+        $mail->reply(body => <<END);
+Hi,
+ You have been sucessfully unsubscribed from ${ \( $list->id ) }
+
+Come back soon,
+- Siesta::Plugin::UnSubscribe
+END
     }
     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(body => <<END);
+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.
+
+Apologies,
+- Siesta::Plugin::UnSubscribe
+END
     }
     return 1;
 }



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52