diff options
| author | czaks <marcin@6irc.net> | 2016-08-19 23:15:47 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-08-19 23:15:47 +0200 |
| commit | 3f38a6db9760c618c61cab4d892ea5632771231e (patch) | |
| tree | 6b6899c37f50e9f83666cc1ce08d8317ef250810 /inc | |
| parent | a5e7b3da6f8ee764ab831d3c1b2df6c17a5e78ca (diff) | |
| parent | fc21854770be17af2939aa8c3e6f3cd5638739c9 (diff) | |
Merge branch 'master' of github.com:vichan-devel/Tinyboard
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 8a2fba44..de67a193 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); } |
