mhonarc-commits
[Top] [All Lists]

CVS: mhonarc/MHonArc/contrib mhastart.pl,1.5,1.6

2004-03-27 13:14:02
Update of /home/users/mhonarc.org/ehood/cvs/mhonarc/mhonarc/MHonArc/contrib
In directory denethor.mallorn.com:/tmp/cvs-serv10811

Modified Files:
	mhastart.pl 
Log Message:
Latest version from Gunnar.


Index: mhastart.pl
===================================================================
RCS file: /home/users/mhonarc.org/ehood/cvs/mhonarc/mhonarc/MHonArc/contrib/mhastart.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** mhastart.pl	9 Mar 2004 07:15:32 -0000	1.5
--- mhastart.pl	27 Mar 2004 20:13:40 -0000	1.6
***************
*** 32,41 ****
        and $ENV{QUERY_STRING} ne 'update') {
          require CGI::Carp;
          errordir();
          if ($errordir) {
              import CGI::Carp 'carpout';
!             open LOG, ">> $errordir/ERRORLOG.TXT" or
!               mhaexit(prtheader(), "<h1>Error</h1>\n",
!                       "<pre>Couldn't open $errordir/ERRORLOG.TXT\n$!");
              carpout(\*LOG);
          } else {
--- 32,42 ----
        and $ENV{QUERY_STRING} ne 'update') {
          require CGI::Carp;
+         require File::Spec;
          errordir();
          if ($errordir) {
              import CGI::Carp 'carpout';
!             my $file = File::Spec->catfile($errordir, 'ERRORLOG.TXT');
!             open LOG, ">> $file" or
!               mhaexit(prtheader(), "<h1>Error</h1>\n<pre>Couldn't open $file\n$!");
              carpout(\*LOG);
          } else {
***************
*** 539,546 ****
      }
      print prtheader(), '<pre>';
!     if ($command eq 'mhonarc' or $command =~ /^mha-d/) {
          print "<b>Command executed:</b>\n$command @ARGV\n\n<b>Output:</b>\n";
          popretrieve() if $pop3 and $checkpop;
!         require "$mhonarc/$command" or die "Couldn't invoke $command\n$!";
      } else {
          print "That wasn't a MHonArc command, was it?";
--- 540,548 ----
      }
      print prtheader(), '<pre>';
!     if ( $command =~ /^(?:mhonarc|mha-d)/ ) {
          print "<b>Command executed:</b>\n$command @ARGV\n\n<b>Output:</b>\n";
          popretrieve() if $pop3 and $checkpop;
!         require File::Spec->catfile($mhonarc, $command)
!           or die "Couldn't invoke $command\n$!";
      } else {
          print "That wasn't a MHonArc command, was it?";
***************
*** 602,606 ****
              }
  
!             unshift @$msg, 'From username(_at_)domain(_dot_)com Sat Jan  1 00:00:00 2000';
              updatembox($msg);
              $pop->delete($msgnum);
--- 604,608 ----
              }
  
!             unshift @$msg, "From username\(_at_)domain(_dot_)com Sat Jan  1 00:00:00 2000\n";
              updatembox($msg);
              $pop->delete($msgnum);

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-COMMITS