From 9541449d568d4eae783f290eb183cad77884d3e3 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Thu, 1 Apr 2021 03:02:47 -0700 Subject: [PATCH] Use config_dir groups file to pull articles, not local_ --- Rocksolid_Light/rslight/scripts/spoolnews.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Rocksolid_Light/rslight/scripts/spoolnews.php b/Rocksolid_Light/rslight/scripts/spoolnews.php index 916bce6..ac12d20 100755 --- a/Rocksolid_Light/rslight/scripts/spoolnews.php +++ b/Rocksolid_Light/rslight/scripts/spoolnews.php @@ -36,7 +36,7 @@ if(!isset($maxarticles_per_run)) { $maxarticles_per_run = 100; } if(!isset($maxfirstrequest)) { - $maxfirstrequest = 100; + $maxfirstrequest = 1000; } if(!isset($CONFIG['enable_nntp']) || $CONFIG['enable_nntp'] != true) { @@ -95,9 +95,12 @@ if(!$ns) { file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Failed to connect to ".$CONFIG['remote_server'].":".$CONFIG['remote_port'], FILE_APPEND); exit(); } -$grouplist = file($remote_groupfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); +$grouplist = file($config_dir.'/'.$config_name.'/groups.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach($grouplist as $findgroup) { - $name = explode(':', $findgroup); + if($findgroup[0] == ":") { + continue; + } + $name = preg_split("/( |\t)/", $findgroup, 2); file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Retrieving articles for: ".$name[0]."...", FILE_APPEND); echo "\nRetrieving articles for: ".$name[0]."... \r\n"; get_articles($ns, $name[0]);