#! /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 <marc@marcbrockschmidt.de>
+# Copyright (c) 2010 Thomas Hochstein <thh@inter.net>
#
# 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 = "";
my $NNTPPass = "";
my $Sender = "";
my $ConfigFile = "yapfaq.cfg";
-my $UsePGP = 1;
+my $UsePGP = 0;
################################## PGP-Config #################################
}
close FH;
} else {
- warn "Couldn't open $File.cfg: $!";
+ warn "Couldn't open $File.cfg: $!\n";
}
$SupersedeMID = "" unless $Supersede;
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;
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";