From 0ab514e863e9bedfafbbafc404c1f4b700ca74da Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Sun, 5 May 2019 10:58:11 +0000
Subject: [PATCH] Log a warning or error if an external program is attempted to
 be executed but can't because it's a DOS program and the current node doesn't
 support it.

---
 src/sbbs3/xtrn.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/sbbs3/xtrn.cpp b/src/sbbs3/xtrn.cpp
index a32a81e764..231d136ea8 100644
--- a/src/sbbs3/xtrn.cpp
+++ b/src/sbbs3/xtrn.cpp
@@ -421,6 +421,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
 	native = native_executable(&cfg, cmdline, mode);
 
 	if(!native && (startup->options&BBS_OPT_NO_DOS)) {
+		lprintf((mode&EX_OFFLINE) ? LOG_ERR : LOG_WARNING, "DOS programs not supported: %s", cmdline);
 		bprintf("Sorry, DOS programs are not supported on this node.\r\n");
 		return -1;
 	}
@@ -1380,6 +1381,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
 
 	} else {
 		if(startup->options&BBS_OPT_NO_DOS) {
+			lprintf((mode&EX_OFFLINE) ? LOG_ERR : LOG_WARNING, "DOS programs not supported: %s", cmdline);
 			bprintf("Sorry, DOS programs are not supported on this node.\r\n");
 			return -1;
 		}
@@ -1681,8 +1683,9 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
 		fclose(dosemubat);
 
 #else
-		bprintf("\r\nExternal DOS programs are not yet supported in \r\n%s\r\n"
-			,VERSION_NOTICE);
+		lprintf((mode&EX_OFFLINE) ? LOG_ERR : LOG_WARNING, "DOS programs not supported: %s", cmdline);
+		bprintf("Sorry, DOS programs are not supported on this node.\r\n");
+
 		return(-1);
 #endif
 	}
-- 
GitLab