X-Git-Url: https://code.th-h.de/?p=usenet%2Fyapfaq.git;a=blobdiff_plain;f=yapfaq.pl;h=a50c08a231050f79dfca9a48e3fda3290690d8c8;hp=a868d6f3fed3bc6f58403ab2cff38b5132f6e973;hb=1ee30cc37f38c730d35f8079cdfcc64d1630a22d;hpb=15dd764aad1617e6b94d328c55bd30a0498ec0a6 diff --git a/yapfaq.pl b/yapfaq.pl index a868d6f..a50c08a 100644 --- a/yapfaq.pl +++ b/yapfaq.pl @@ -1,16 +1,18 @@ #! /usr/bin/perl -W # -# yapfaq Version 0.5b by Marc 'HE' Brockschmidt +# yapfaq Version 0.6 by Thomas Hochstein +# (Original author: Marc Brockschmidt) # -# This script posts any project described in it's config-file. Most persons +# This script posts any project described in its config-file. Most people # will use it in combination with cron(8). # # Copyright (C) 2003 Marc Brockschmidt +# Copyright (c) 2010 Thomas Hochstein # # It can be redistributed and/or modified under the same terms under # which Perl itself is published. -my $Version = "0.5b"; +my $Version = "0.6-unreleased"; my $NNTPServer = ""; my $NNTPUser = ""; @@ -77,7 +79,7 @@ foreach (@Config) { } close FH; } else { - warn "Couldn't open $File.cfg: $!"; + warn "Couldn't open $File.cfg: $!\n"; } $SupersedeMID = "" unless $Supersede; @@ -161,7 +163,7 @@ sub postfaq { s/\r//; push (@Body, $_), next if $InRealBody; $InRealBody++ if /^$/; - $LastModified = $1 if /^Last-modified: (\S+)$/; + $LastModified = $1 if /^Last-modified: (\S+)$/i; push @Body, $_; } close FH; @@ -237,7 +239,7 @@ sub post { if (!$NewsConnection->ok()) { open FH, ">>ERROR.dat"; - print FH "\nPosting failed! Response from news server:\n"; + print FH "\nPosting failed! Saving to ERROR.dat. Response from news server:\n"; print FH $NewsConnection->code(); print FH $NewsConnection->message(); print FH "\n";