From 3a029fa8fae8ec897ecb0d43cc5227af103f5d5c Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows 11)" <rob@synchro.net>
Date: Sun, 9 Jun 2024 18:42:05 -0700
Subject: [PATCH] Make legacy/alias properties non-enumerable: computer, modem

I noticed these redundant properties were being logged for every logon in
logon.jsonl. We don't need these properties separately enumerable, and really
they shouldn't be used anyway.

computer is an alias of host_name
modem is an alias of connection
---
 src/sbbs3/js_user.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/sbbs3/js_user.c b/src/sbbs3/js_user.c
index 05833e0f7f..efe032148c 100644
--- a/src/sbbs3/js_user.c
+++ b/src/sbbs3/js_user.c
@@ -809,7 +809,7 @@ static jsSyncPropertySpec js_user_properties[] = {
 	{	"note"				,USER_PROP_NOTE		 	,USER_PROP_FLAGS,		310},
 	{	"ip_address"		,USER_PROP_IPADDR	 	,USER_PROP_FLAGS,		310},
 	{	"host_name"			,USER_PROP_COMP		 	,USER_PROP_FLAGS,		310},
-	{	"computer"			,USER_PROP_COMP		 	,USER_PROP_FLAGS,		310},
+	{	"computer"			,USER_PROP_COMP		 	,0, /* Alias */			310},
 	{	"comment"			,USER_PROP_COMMENT	 	,USER_PROP_FLAGS,		310},
 	{	"netmail"			,USER_PROP_NETMAIL	 	,USER_PROP_FLAGS,		310},
 	{	"email"				,USER_PROP_EMAIL	 	,USER_PROP_FLAGS|JSPROP_READONLY,		310},
@@ -823,7 +823,7 @@ static jsSyncPropertySpec js_user_properties[] = {
 	{	"birthday"			,USER_PROP_BIRTHDAY  	,USER_PROP_FLAGS,		31802},
 	{	"age"				,USER_PROP_AGE			,USER_PROP_FLAGS|JSPROP_READONLY,		310},
 	{	"connection"		,USER_PROP_MODEM      	,USER_PROP_FLAGS,		310},
-	{	"modem"				,USER_PROP_MODEM      	,USER_PROP_FLAGS,		310},
+	{	"modem"				,USER_PROP_MODEM      	,0, /* Alias */			310},
 	{	"screen_rows"		,USER_PROP_ROWS		 	,USER_PROP_FLAGS,		310},
 	{	"screen_columns"	,USER_PROP_COLS		 	,USER_PROP_FLAGS,		31802},
 	{	"gender"			,USER_PROP_SEX		 	,USER_PROP_FLAGS,		310},
@@ -855,9 +855,8 @@ static const char* user_prop_desc[] = {
 	,"Chat handle"
 	,"Language code (blank, if default, e.g. English)"
 	,"Sysop note"
-	,"IP address last logged on from"
-	,"Host name last logged on from"
-	,"AKA host_name"
+	,"IP address last logged-in from"
+	,"Host name last logged-in from (AKA <tt>computer</tt>)"
 	,"Sysop's comment"
 	,"External e-mail address"
 	,"Local Internet e-mail address	- <small>READ ONLY</small>"
@@ -870,8 +869,7 @@ static const char* user_prop_desc[] = {
 	,"Birth month (1-12)"
 	,"Birth day of month (1-31)"
 	,"Calculated age in years - <small>READ ONLY</small>"
-	,"Connection type (protocol)"
-	,"AKA connection"
+	,"Connection type (protocol, AKA <tt>modem</tt>)"
 	,"Terminal rows (0 = auto-detect)"
 	,"Terminal columns (0 = auto-detect)"
 	,"Gender type (e.g. M or F or any single-character)"
-- 
GitLab