diff options
| author | Marcin Ćabanowski <marcin@6irc.net> | 2016-08-19 22:08:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-19 22:08:33 +0200 |
| commit | fc21854770be17af2939aa8c3e6f3cd5638739c9 (patch) | |
| tree | dc624b3a3749f9a10bb2671d5d17374c62a5e262 /inc | |
| parent | a779b96370d3353c8409d64b70c724fa783ad219 (diff) | |
| parent | 1c3e6e590aca050802f271d157f0d274c8217d4d (diff) | |
Merge pull request #196 from majestrate/master
patch for nntpchan stream
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/nntpchan/nntpchan.php | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |
