From 626d810527e12f7189421b47e83d8b6043a5d351 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Fri, 4 Oct 2024 05:10:05 -0700 Subject: [PATCH] Add feature to account_manager to look up posters by posting-hash when necessary. --- Rocksolid_Light/rocksolid/lib/post.inc.php | 8 ++++ .../rslight/scripts/account_manager.php | 48 +++++++++++++++---- 2 files changed, 46 insertions(+), 10 deletions(-) diff --git a/Rocksolid_Light/rocksolid/lib/post.inc.php b/Rocksolid_Light/rocksolid/lib/post.inc.php index 682828b..c202cdf 100644 --- a/Rocksolid_Light/rocksolid/lib/post.inc.php +++ b/Rocksolid_Light/rocksolid/lib/post.inc.php @@ -534,6 +534,14 @@ function message_post($subject, $from, $newsgroups, $ref, $body, $encryptthis = if ($userconfig) { set_user_config($authname, 'posting-user', $posting_user); } + $posthashfile = $spooldir . '/posthash.dat'; + if(file_exists($posthashfile)) { + $posthash = unserialize(file_get_contents($posthashfile)); + } else { + $posthash = array(); + } + $posthash[$posting_user] = $authname; + file_put_contents($posthashfile, serialize($posthash)); } if (isset($encryptthis)) { diff --git a/Rocksolid_Light/rslight/scripts/account_manager.php b/Rocksolid_Light/rslight/scripts/account_manager.php index e4b2d30..ee7ad4e 100644 --- a/Rocksolid_Light/rslight/scripts/account_manager.php +++ b/Rocksolid_Light/rslight/scripts/account_manager.php @@ -1,5 +1,5 @@