From e82da9b90868e1fbdeac23050643c2fc3b5d5cf4 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Tue, 1 Dec 2020 20:52:08 -0800
Subject: [PATCH] C version of chk_ar() now supports the DOS keyword...

The "DOS" ARS keyword was always evaluating to false, on all platforms, for the C version of chk_ar(), which is used for populating JS *_area objects and for the User.compare_ars() implementation.

Unfortunately, the startup (sbbs.ini) "NO_DOS" option is not recognized here (yet), so it'll report true (e.g. for Win64 or Linux systems with DOSemu) even if/when the NO_DOS option is set.
---
 src/sbbs3/userdat.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c
index 74521fe507..1ffd3cd7ca 100644
--- a/src/sbbs3/userdat.c
+++ b/src/sbbs3/userdat.c
@@ -1725,7 +1725,11 @@ static BOOL ar_exp(scfg_t* cfg, uchar **ptrptr, user_t* user, client_t* client)
 				#endif
 				break;
 			case AR_DOS:
-				result=not;
+				#if defined(_WIN32) || (defined(__linux__) && defined(USE_DOSEMU)) || defined(__FreeBSD__)
+					result=!not;
+				#else
+					result=not;
+				#endif
 				break;
 			case AR_WIN32:
 				#ifndef _WIN32
-- 
GitLab