/[notice-sender]/trunk/sender.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/sender.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 32 by dpavlin, Mon May 16 22:32:58 2005 UTC revision 36 by dpavlin, Tue May 17 17:49:14 2005 UTC
# Line 83  if ($list_name = $opt->{'new'}) { Line 83  if ($list_name = $opt->{'new'}) {
83    
84          die "need e-mail address for list (as argument or on STDIN)\n" unless ($email);          die "need e-mail address for list (as argument or on STDIN)\n" unless ($email);
85    
86          my $l = $nos->_get_list($list_name) || $nos->_add_list(          my $id = $nos->new_list(
87                  list => $list_name,                  list => $list_name,
88                  email => $email,                  email => $email,
89          ) || die "can't add list $list_name\n";          ) || die "can't add list $list_name\n";
90    
91          print "added list $list_name with ID ",$l->id,"\n";          print "added list $list_name with ID $id\n";
92    
93    
94  =item --list[=list_name]  =item --list[=list_name]
# Line 190  add C<--verbose> flag, it will display a Line 190  add C<--verbose> flag, it will display a
190                          my $msg = $m->message_id->message;                          my $msg = $m->message_id->message;
191                          $msg =~ s/\s+/ /gs;                          $msg =~ s/\s+/ /gs;
192    
193                          $l .= sprintf(" %-10s %15s : ", $m->list_id->name, $date);                          $l .= sprintf(" %-15s %15s : ", $m->list_id->name, $date);
194                          $l .= substr($msg, 0, 79 - length($l));                          $l .= substr($msg, 0, 79 - length($l));
195    
196                          print "$l\n";                          print "$l\n";
# Line 217  Feed incomming message back into notice Line 217  Feed incomming message back into notice
217    
218  =cut  =cut
219    
220  } elsif ($opt->{'inbox'}) {  } elsif ($list_name = $opt->{'inbox'}) {
221    
222            my $message;
223            while(<>) {
224                    $message .= $_;
225            }
226    
227            $nos->inbox_message(
228                    list => $list_name,
229                    message => $message,
230            ) || die "can't receive message for list $list_name";
231    
         warn "inbox option is not implemented";  
232    
233  } else  {  } else  {
234          die "see perldoc $0 for help\n";          die "see perldoc $0 for help\n";

Legend:
Removed from v.32  
changed lines
  Added in v.36

  ViewVC Help
Powered by ViewVC 1.1.26