Chomp a newline off the end of the text read from /etc/nntpserver.
[sgt/utils] / nntpid / nntpid
index e444c73..298dbf3 100755 (executable)
@@ -16,8 +16,7 @@
 # a 480 response from the news server; if your news server isn't paranoid
 # then the script will never need to look at NNTPAUTH.
 
-# Copyright 2000 Simon Tatham. All rights reserved.
-# FIXME: put in a licence notice.
+# Copyright 2000,2004 Simon Tatham. All rights reserved.
 
 require 5.002;
 use Socket;
@@ -100,6 +99,7 @@ if ($all) {
 $ns=$ENV{'NNTPSERVER'};
 if (!defined $ns or !length $ns) {
   $ns = `cat /etc/nntpserver`;
+  chomp $ns;
 }
 $port = (getservbyname("nntp", "tcp"))[2];
 $ns = inet_aton($ns);