From d227fcff976589fbc92c6b25db5f7fc382a9a2fb Mon Sep 17 00:00:00 2001
From: Nigel Reed <nigel@nigelreed.net>
Date: Fri, 19 Jul 2024 21:34:53 -0500
Subject: [PATCH] More MRC changes.

js-connector.js - fixed a typo.
Added ssl config examples to mrc-connector.examples.ini
Added show_nicks to js-client.js and js-client.example.ini
For Keyop. This allows the sysop to turn nick lists on when
connecting to MRC.
---
 xtrn/mrc/mrc-client.example.ini    | 4 ++++
 xtrn/mrc/mrc-client.js             | 8 ++++++--
 xtrn/mrc/mrc-connector.example.ini | 3 +++
 xtrn/mrc/mrc-connector.js          | 2 +-
 xtrn/mrc/readme.txt                | 7 +++++--
 5 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/xtrn/mrc/mrc-client.example.ini b/xtrn/mrc/mrc-client.example.ini
index 879cdea556..589b897001 100644
--- a/xtrn/mrc/mrc-client.example.ini
+++ b/xtrn/mrc/mrc-client.example.ini
@@ -8,3 +8,7 @@ motd = true
 banners = true
 
 [aliases]
+
+[client]
+;change this to true if you want show the nick list on connect.
+show_nicks=false
diff --git a/xtrn/mrc/mrc-client.js b/xtrn/mrc/mrc-client.js
index 0efe89998d..4b30bbea34 100644
--- a/xtrn/mrc/mrc-client.js
+++ b/xtrn/mrc/mrc-client.js
@@ -18,18 +18,22 @@ js.time_limit=0;
 
 var input_state = 'chat';
 
-var show_nicks = false;
 
 var f = new File(js.startup_dir + 'mrc-client.ini');
 f.open('r');
 const settings = {
     root: f.iniGetObject(),
     startup: f.iniGetObject('startup'),
-    aliases: f.iniGetObject('aliases') || {}
+    aliases: f.iniGetObject('aliases'),
+    client: f.iniGetObject('client') || {}
 };
+
 f.close();
 f = undefined;
 
+log(LOG_DEBUG,"settings is " + settings.client.show_nicks);
+var show_nicks = (settings.client.show_nicks === true) ? true : false;
+
 const NICK_COLOURS = [
     '\x01h\x01r',
     '\x01h\x01g',
diff --git a/xtrn/mrc/mrc-connector.example.ini b/xtrn/mrc/mrc-connector.example.ini
index 6107d9b5b0..a19c076de1 100644
--- a/xtrn/mrc/mrc-connector.example.ini
+++ b/xtrn/mrc/mrc-connector.example.ini
@@ -1,5 +1,8 @@
 server = mrc.bottomlessabyss.net
 port = 5000
+;use port 5001 if you want SSL and uncomment ssl=true
+;port = 5001
+;ssl=true
 timeout = 10
 ping_interval = 60
 reconnect_delay = 30
diff --git a/xtrn/mrc/mrc-connector.js b/xtrn/mrc/mrc-connector.js
index 7d13987368..072fe7db5c 100644
--- a/xtrn/mrc/mrc-connector.js
+++ b/xtrn/mrc/mrc-connector.js
@@ -168,7 +168,7 @@ function mrc_connect(host, port, ssl) {
     if (ssl && port !== 5001)
         log(LOG_INFO, "If SSL is true then you probably want port 5001");
     if (!ssl && port !== 5000)
-        log(LOG_INFO, "Your probably want port 5000 if not using SSL");
+        log(LOG_INFO, "You probably want port 5000 if not using SSL");
 
     const platform = format(
         'SYNCHRONET/%s_%s/%s',
diff --git a/xtrn/mrc/readme.txt b/xtrn/mrc/readme.txt
index 63148b8be6..1d4a47063c 100644
--- a/xtrn/mrc/readme.txt
+++ b/xtrn/mrc/readme.txt
@@ -4,8 +4,8 @@ echicken -at- bbs.electronicchicken.com
 1) Quick Start
 2) Client -> Server -> Server
 3) Customization
-4) SSL Support
-5) Customization
+4) MRC Stats
+5) SSL Support
 6) Support
 
 
@@ -78,6 +78,9 @@ mrc-client.ini:
     have a good reason for changing it.
   - The values in the [startup] section determine which room the client joins
     on startup, and whether the Message of the Day and banners are displayed.
+  - Change show_nicks in the [client] section to always display the nick list
+    when connecting to the MRC server.
+
 
 
 4) MRC Stats
-- 
GitLab