From: Thomas Hochstein Date: Fri, 9 Apr 2010 22:49:24 +0000 (+0200) Subject: Change: Authenticate only if $NNTPUser is set. X-Git-Tag: v0.7~14 X-Git-Url: https://code.th-h.de/?p=usenet%2Fyapfaq.git;a=commitdiff_plain;h=d69ba0bb348ffe87f0ead8497467b0aec5a10751;hp=dbca4ad8a165e3d51fe4caed45f9a3ee04bf5db0 Change: Authenticate only if $NNTPUser is set. Signed-off-by: Thomas Hochstein --- diff --git a/yapfaq.pl b/yapfaq.pl index 5b7160a..bce9684 100644 --- a/yapfaq.pl +++ b/yapfaq.pl @@ -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();