From 729852b7a8593e1fdc0241d31356d25b33eb24ca Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Sat, 15 Jun 2019 03:02:39 +0000 Subject: [PATCH] Bug-fixes: 1. The 'irc' mod options value was toggling the 'I' command key, not 'R' ('R' is for IRC, not 'I') 2. Use load({}, "sbbsimsg.js") so that the chat_sec options aren't blown-away by sbbsimsg.js Enhancement: - added support for 'imsg' option in [chat_sec] section of modopts.ini, if set to false, disables the inter-bbs instant message command key. --- exec/chat_sec.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/exec/chat_sec.js b/exec/chat_sec.js index 19cc678b20..2c4edcbefa 100644 --- a/exec/chat_sec.js +++ b/exec/chat_sec.js @@ -22,6 +22,8 @@ if (options.irc_seclevel === undefined) options.irc_seclevel = 90; if (options.finger === undefined) options.finger = true; +if (options.imsg === undefined) + options.imsg = true; if(user.security.restrictions & UFLAG_C) { write(bbs.text(R_Chat)); @@ -48,9 +50,11 @@ while(1) { bbs.nodesync(); write("\r\n\x01_\x01y\x01hChat: \x01n"); - var keys = "ACDJPQRST?\r"; - if(options.irc) + var keys = "ACDJPQST?\r"; + if(options.imsg) keys += "I"; + if(options.irc) + keys += "R"; if(options.finger) keys += "F"; switch(console.getkeys(keys, K_UPPER)) { @@ -77,7 +81,7 @@ while(1) { break; case 'I': writeln(""); - load("sbbsimsg.js"); + load({}, "sbbsimsg.js"); break; case 'R': { -- GitLab