Change: Authenticate only if $NNTPUser is set.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein 2010-04-10 00:49:24 +02:00
parent dbca4ad8a1
commit d69ba0bb34

View file

@ -305,7 +305,7 @@ sub post {
my $NewsConnection = Net::NNTP->new($NNTPServer, Reader => 1)
or die "$0: E: Can't connect to news server '$NNTPServer'!\n";
$NewsConnection->authinfo ($NNTPUser, $NNTPPass);
$NewsConnection->authinfo ($NNTPUser, $NNTPPass) if (defined($NNTPUser));
$NewsConnection->post();
$NewsConnection->datasend (@$ArticleR);
$NewsConnection->dataend();