From 1c3e6e590aca050802f271d157f0d274c8217d4d Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 19 Aug 2016 16:05:50 -0400 Subject: [PATCH] patch for nntpchan stream --- inc/nntpchan/nntpchan.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/nntpchan/nntpchan.php b/inc/nntpchan/nntpchan.php index 25215e94..f21fdd2d 100644 --- a/inc/nntpchan/nntpchan.php +++ b/inc/nntpchan/nntpchan.php @@ -64,7 +64,9 @@ function gen_nntp($headers, $files) { } function nntp_publish($msg, $id) { - $s = fsockopen("tcp://localhost:1119"); + global $config; + $server = $config["nntpchan"]["server"]; + $s = fsockopen("tcp://$server"); fgets($s); fputs($s, "MODE STREAM\r\n"); fgets($s); @@ -72,6 +74,7 @@ function nntp_publish($msg, $id) { fputs($s, $msg); fputs($s, "\r\n.\r\n"); fgets($s); + fputs($s, "QUIT\r\n"); fclose($s); }