From 110d05bedcbb249b95d65f3c2158d240355519a2 Mon Sep 17 00:00:00 2001 From: Dave Cloutier <stackfault@vert.synchro.net> Date: Mon, 3 Apr 2023 23:56:08 +0000 Subject: [PATCH] MRC client updates for Synchronet --- xtrn/mrc/mrc-connector.js | 5 +++-- xtrn/mrc/mrc-session.js | 14 ++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/xtrn/mrc/mrc-connector.js b/xtrn/mrc/mrc-connector.js index da3427d034..43d1b4ac12 100644 --- a/xtrn/mrc/mrc-connector.js +++ b/xtrn/mrc/mrc-connector.js @@ -25,7 +25,7 @@ const system_info = f.iniGetObject('info') || {}; f.close(); f = undefined; -const PROTOCOL_VERSION = '1.2.9'; +const PROTOCOL_VERSION = '1.3.0'; const MAX_LINE = 256; const FROM_SITE = system.qwk_id.toLowerCase(); const SYSTEM_NAME = system_info.system_name || system.name; @@ -140,7 +140,8 @@ function client_accept() { function client_send(message, username) { Object.keys(clients).forEach(function (e) { if (message.to_user == 'NOTME' && message.from_user == clients[e].username) return; - if (!username || clients[e].username == username) { + // Ignore case for users since MRC is not case sensitive in user context + if (!username || clients[e].username.toUpperCase() == username.toUpperCase()) { log(LOG_DEBUG, 'Forwarding message to ' + clients[e].username); clients[e].socket.sendline(JSON.stringify(message)); } diff --git a/xtrn/mrc/mrc-session.js b/xtrn/mrc/mrc-session.js index 4657b9b7a2..781939ac07 100644 --- a/xtrn/mrc/mrc-session.js +++ b/xtrn/mrc/mrc-session.js @@ -170,8 +170,9 @@ function MRC_Session(host, port, user, pass, alias) { chatters: { help: 'List current users' }, - connected: { - help: 'List connected BBSs' + bbses: { + help: 'List connected BBSs', + command: 'CONNECTED' }, help: { help: 'Display this help message', @@ -214,10 +215,10 @@ function MRC_Session(host, port, user, pass, alias) { } } }, - notify: { - help: 'Send a notification message to the server (what?)', + quote: { + help: 'Send a raw command to the server', callback: function (str) { - this.send_command('NOTIFY:' + str, 'ALL'); + this.send_command(str); } }, quit: { @@ -232,7 +233,8 @@ function MRC_Session(host, port, user, pass, alias) { command: 'LIST' }, stats: { - help: 'Return anonymous server stats' + help: 'Return anonymous server stats', + command: 'statistics' }, topic: { help: 'Change the topic of the current room', -- GitLab