[prev] [thread] [next] [lurker] [Date index for 2003/03/16]
Update of /cvsroot/siesta/siesta/lib/Siesta/Plugin In directory sc8-pr-cvs1:/tmp/cvs-serv23708/lib/Siesta/Plugin Modified Files: ReplyTo.pm SimpleSig.pm Subscribe.pm Log Message: refactor the prefs system like billyo Index: ReplyTo.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/ReplyTo.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ReplyTo.pm 15 Mar 2003 20:15:47 -0000 1.6 +++ ReplyTo.pm 16 Mar 2003 13:10:36 -0000 1.7 @@ -23,8 +23,7 @@ my $list = $mail->list || undef; my $post_address = ( defined $list ) ? $mail->list->post_address : undef; - my $munge = $self->preference( $mail, 'munge' ) - || $self->options->{munge}->{default}; + my $munge = $list->pref( $self, 'munge' ); $munge = ( defined $post_address ) ? $munge : 0; Index: SimpleSig.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/SimpleSig.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- SimpleSig.pm 17 Oct 2002 11:52:18 -0000 1.14 +++ SimpleSig.pm 16 Mar 2003 13:10:36 -0000 1.15 @@ -13,11 +13,7 @@ my $mail = shift; my $list = $mail->list; - # some sort of configuration lookup based on list and this plugin name, - # however lets just say 5 instead - - my $maxlines = $self->preference( $mail, 'maxlines' ) - || $self->options->{maxlines}->{default}; + my $maxlines = $list->pref( $self, 'maxlines' ); my $body = join '', @{ $mail->body() }; my ( undef, $sig ) = split /-- \n/, $body, 2; @@ -28,7 +24,7 @@ my (@lines) = split /\n/, $sig; if ( scalar(@lines) > $maxlines + 1 ) { $mail->reply( body => <<END); -Hi, +Hi, ${ \( $list->owner ) } has set this list to have a maximum .sig length of $maxlines lines, hence your mail has been rejected, Index: Subscribe.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/Subscribe.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Subscribe.pm 16 Mar 2003 02:23:46 -0000 1.17 +++ Subscribe.pm 16 Mar 2003 13:10:36 -0000 1.18 @@ -16,7 +16,7 @@ my $email = $mail->from; # check if this needs confirming - if ( $list->preference('confirm_subscriptions') && ! $mail->confirmed ) { + if ( $list->pref($self, 'confirm') && ! $mail->confirmed ) { $mail->defer( for => "confirm", from => "user" ); return 1; } @@ -76,6 +76,18 @@ Apologies, - Siesta::Plugin::Subscribe END +} + +sub config { + +{ + 'confirm' + => { + 'description' => 'do the deferred confirmation thang', + 'type' => 'boolean', + 'default' => 1, + 'widget' => 'checkbox', + }, + }; }
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52