Skip to content
Snippets Groups Projects
Commit ffda015c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'master' into 'master'

MRC client updates for Synchronet

See merge request !276
parents e0979e27 52b43ee3
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!276MRC client updates for Synchronet
...@@ -25,7 +25,7 @@ const system_info = f.iniGetObject('info') || {}; ...@@ -25,7 +25,7 @@ const system_info = f.iniGetObject('info') || {};
f.close(); f.close();
f = undefined; f = undefined;
const PROTOCOL_VERSION = '1.2.9'; const PROTOCOL_VERSION = '1.3.0';
const MAX_LINE = 256; const MAX_LINE = 256;
const FROM_SITE = system.qwk_id.toLowerCase(); const FROM_SITE = system.qwk_id.toLowerCase();
const SYSTEM_NAME = system_info.system_name || system.name; const SYSTEM_NAME = system_info.system_name || system.name;
...@@ -140,7 +140,8 @@ function client_accept() { ...@@ -140,7 +140,8 @@ function client_accept() {
function client_send(message, username) { function client_send(message, username) {
Object.keys(clients).forEach(function (e) { Object.keys(clients).forEach(function (e) {
if (message.to_user == 'NOTME' && message.from_user == clients[e].username) return; 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); log(LOG_DEBUG, 'Forwarding message to ' + clients[e].username);
clients[e].socket.sendline(JSON.stringify(message)); clients[e].socket.sendline(JSON.stringify(message));
} }
......
...@@ -170,8 +170,9 @@ function MRC_Session(host, port, user, pass, alias) { ...@@ -170,8 +170,9 @@ function MRC_Session(host, port, user, pass, alias) {
chatters: { chatters: {
help: 'List current users' help: 'List current users'
}, },
connected: { bbses: {
help: 'List connected BBSs' help: 'List connected BBSs',
command: 'CONNECTED'
}, },
help: { help: {
help: 'Display this help message', help: 'Display this help message',
...@@ -214,10 +215,10 @@ function MRC_Session(host, port, user, pass, alias) { ...@@ -214,10 +215,10 @@ function MRC_Session(host, port, user, pass, alias) {
} }
} }
}, },
notify: { quote: {
help: 'Send a notification message to the server (what?)', help: 'Send a raw command to the server',
callback: function (str) { callback: function (str) {
this.send_command('NOTIFY:' + str, 'ALL'); this.send_command(str);
} }
}, },
quit: { quit: {
...@@ -232,7 +233,8 @@ function MRC_Session(host, port, user, pass, alias) { ...@@ -232,7 +233,8 @@ function MRC_Session(host, port, user, pass, alias) {
command: 'LIST' command: 'LIST'
}, },
stats: { stats: {
help: 'Return anonymous server stats' help: 'Return anonymous server stats',
command: 'statistics'
}, },
topic: { topic: {
help: 'Change the topic of the current room', help: 'Change the topic of the current room',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment