rev 1513 - trunk/siesta/bin

[prev] [thread] [next] [lurker] [Date index for 2004/04/07]

From: simon
Subject: rev 1513 - trunk/siesta/bin
Date: 17:17 on 07 Apr 2004
Author: simon
Date: 2004-04-07 17:17:14 +0100 (Wed, 07 Apr 2004)
New Revision: 1513

Modified:
   trunk/siesta/bin/bandito
Log:
Remove debug and let Archive and Digest work


Modified: trunk/siesta/bin/bandito
===================================================================
--- trunk/siesta/bin/bandito	2004-04-07 15:54:18 UTC (rev 1512)
+++ trunk/siesta/bin/bandito	2004-04-07 16:17:14 UTC (rev 1513)
@@ -121,9 +121,6 @@
 
 my $data = $pr->load();
 
-use YAML;
-print Dump $data;
-exit;
 
 (my $list_name   = $data->{private_archive_file_dir}) =~ s!.+/([^/]+).mbox$!$1!;
 my $owner        = $data->{owner}->[0];
@@ -148,7 +145,7 @@
 
 print STDERR "Adding plugins : ";
 # TODO there;s a problem with Archive and Digest
-my @plugins = qw(Debounce MembersOnly Moderated ListHeaders ReplyTo SubjectTag MessageFooter Send +NoMail);
+my @plugins = qw(Debounce MembersOnly Moderated ListHeaders ReplyTo SubjectTag MessageFooter Digest Send +NoMail Archive +Digest);
 print STDERR join ", ", @plugins;
 print STDERR "\n\n";
 
@@ -206,17 +203,21 @@
 
 }
 
+foreach my $email (keys  %{$data->{digest_members}}) {
+    $plugins{'+Digest'}->{$email}->{pref}->{digest} = 1;
+    print STDERR "Digest => $email\n";
+}
 
 
-$list->{plugins}->{post}  = [ values %plugins ];
+$list->{plugins}->{post}  = [ map { $plugins{$_} } @plugins ];
 
 # now add the sub and unsub ones
 $list->{plugins}->{sub}   = [ bless { name => 'Subscribe'   }, 'Siesta::FakePlugin' ];
 $list->{plugins}->{unsub} = [ bless { name => 'UnSubscribe' }, 'Siesta::FakePlugin' ];
 
+print STDERR "\n\n";
 
 
-
 # make the new members
 my @members;
 print STDERR "Adding new members : \n";
@@ -235,9 +236,6 @@
     push @members, $member; 
 }
 
-foreach my $email (keys  %{$data->{digest_member}}) {
-    $plugins{'+Digest'}->{$email}->{pref}->{digest} = 1;
-}
 
 
 $list->{members} = \@members;
@@ -281,10 +279,13 @@
 
         my $class = "Siesta::Plugin::".$self->{name};
 
+        
         $class->require;
 
+        my $fake = bless { list => bless { name => $list_name }, 'Siesta::List'  }, $class;        
 
-        return $class->options;
+        my $options = $fake->options();
+        return $options;
 }
 
 package Siesta::FakeList;

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