From 3560ebc02d0e63c67790ab87bebd7b75b867b373 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows)" <rob@synchro.net>
Date: Sun, 24 Sep 2023 18:51:31 -0700
Subject: [PATCH] Use On/Off text.dat strings instead of (soon to be
 deprecated) ON/OFF strings

There are other ways to generate forced-upper case expanded @-codes, if that's
what you want.

Fewer duplicates in text.dat make localization, translation to other languages
easier.
---
 src/sbbs3/chat.cpp     | 6 +++---
 src/sbbs3/execfunc.cpp | 2 +-
 src/sbbs3/inkey.cpp    | 4 ++--
 src/sbbs3/telgate.cpp  | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/sbbs3/chat.cpp b/src/sbbs3/chat.cpp
index 8b641d92ab..2275eb6984 100644
--- a/src/sbbs3/chat.cpp
+++ b/src/sbbs3/chat.cpp
@@ -291,7 +291,7 @@ void sbbs_t::multinodechat(int channel)
 						useron.chat^=CHAT_ACTION;
 						bprintf("\r\nAction commands are now %s\r\n"
 							,useron.chat&CHAT_ACTION
-							? text[ON]:text[OFF]);
+							? text[On]:text[Off]);
 						putuserchat(useron.number, useron.chat);
 						break;
 					case 'C':   /* List of action commands */
@@ -314,7 +314,7 @@ void sbbs_t::multinodechat(int channel)
 						useron.chat^=CHAT_ECHO;
 						bprintf(text[EchoIsNow]
 							,useron.chat&CHAT_ECHO
-							? text[ON]:text[OFF]);
+							? text[On]:text[Off]);
 						putuserchat(useron.number, useron.chat);
 						break;
 					case 'L':	/* list nodes */
@@ -645,7 +645,7 @@ bool sbbs_t::sysop_page(void)
 		else {
 			sys_status^=SS_SYSPAGE;
 			bprintf(text[SysopPageIsNow]
-				,sys_status&SS_SYSPAGE ? text[ON] : text[OFF]);
+				,sys_status&SS_SYSPAGE ? text[On] : text[Off]);
 			nosound();
 		}
 		if(!(sys_status&SS_SYSPAGE))
diff --git a/src/sbbs3/execfunc.cpp b/src/sbbs3/execfunc.cpp
index 3ce3efa2cc..cfea699fb2 100644
--- a/src/sbbs3/execfunc.cpp
+++ b/src/sbbs3/execfunc.cpp
@@ -275,7 +275,7 @@ int sbbs_t::exec_function(csi_t *csi)
 		case CS_ANSI_CAPTURE:           /* Capture ANSI codes */
 			sys_status^=SS_ANSCAP;
 			bprintf(text[ANSICaptureIsNow]
-				,sys_status&SS_ANSCAP ? text[ON] : text[OFF]);
+				,sys_status&SS_ANSCAP ? text[On] : text[Off]);
 			return(0);
 		case CS_LIST_TEXT_FILE:              /* View ASCII/ANSI/Ctrl-A file */
 			if(!chksyspass())
diff --git a/src/sbbs3/inkey.cpp b/src/sbbs3/inkey.cpp
index 069ce2eb8f..a36f8dae0a 100644
--- a/src/sbbs3/inkey.cpp
+++ b/src/sbbs3/inkey.cpp
@@ -152,9 +152,9 @@ char sbbs_t::handle_ctrlkey(char ch, int mode)
 		CRLF;
 		bputs(text[RawMsgInputModeIsNow]);
 		if(console&CON_RAW_IN)
-			bputs(text[OFF]);
+			bputs(text[Off]);
 		else
-			bputs(text[ON]);
+			bputs(text[On]);
 		console^=CON_RAW_IN;
 		CRLF;
 		CRLF;
diff --git a/src/sbbs3/telgate.cpp b/src/sbbs3/telgate.cpp
index c0d8a63b44..fd22bc2b19 100644
--- a/src/sbbs3/telgate.cpp
+++ b/src/sbbs3/telgate.cpp
@@ -167,7 +167,7 @@ bool sbbs_t::telnet_gate(char* destaddr, uint mode, unsigned timeout, char* clie
 								mode^=TG_ECHO;
 								bprintf(text[EchoIsNow]
 									,mode&TG_ECHO
-									? text[ON]:text[OFF]);
+									? text[On]:text[Off]);
 								continue;
 							case 'L':
 								whos_online(true);
-- 
GitLab