diff --git a/core/mrc.js b/core/mrc.js index c781826f..496e7e9b 100644 --- a/core/mrc.js +++ b/core/mrc.js @@ -55,6 +55,8 @@ const helpText = ` |03/|11topic |03 |08- |07Set the room topic |03/|11bbses |08& |03/|11info |08- |07Info about BBS's connected |03/|11meetups |08- |07Info about MRC MeetUps +|03/|11quote |08- |07Send raw command to server +|03/|11help |08- |07Server-side commands help --- |03/|11l33t |03 |08- |07l337 5p34k |03/|11kewl |03 |08- |07BBS KeWL SPeaK @@ -375,6 +377,18 @@ exports.getModule = class mrcModule extends MenuModule { '|08' + currentTime + '|00 ' + message.body + '|00' ); } + + // Deliver PrivMsg + else if (message.to_user.toLowerCase() == this.state.alias.toLowerCase()) { + const currentTime = moment().format( + this.client.currentTheme.helpers.getTimeFormat() + ); + this.addMessageToChatLog( + '|08' + currentTime + '|00 ' + message.body + '|00' + ); + } + + } this.viewControllers.mrcChat.switchFocus(MciViewIds.mrcChat.inputArea); @@ -540,6 +554,58 @@ exports.getModule = class mrcModule extends MenuModule { this.sendServerMessage('LIST'); break; + // Allow support for new server commands without change to client + case 'quote': + this.sendServerMessage(`${message.substr(7)}`); + break; + + /** + * Process known additional server commands directly + */ + case 'afk': + this.sendServerMessage( + `AFK ${message.substr(5)}` + ); + break; + + case 'roomconfig': + this.sendServerMessage( + `ROOMCONFIG ${message.substr(12)}` + ); + break; + + case 'roompass': + this.sendServerMessage( + `ROOMPASS ${message.substr(12)}` + ); + break; + + case 'status': + this.sendServerMessage( + `STATUS ${message.substr(8)}` + ); + break; + + case 'lastseen': + this.sendServerMessage( + `LASTSEEN ${message.substr(10)}` + ); + break; + + case 'help': + this.sendServerMessage( + `HELP ${message.substr(6)}` + ); + break; + + case 'statistics': + case 'changelog': + case 'listbans': + case 'listmutes': + case 'routing': + this.sendServerMessage(cmd[0].toUpperCase()); + break; + case 'quit': return this.prevMenu(); diff --git a/core/servers/chat/mrc_multiplexer.js b/core/servers/chat/mrc_multiplexer.js index 68cf64d7..abdc64a4 100644 --- a/core/servers/chat/mrc_multiplexer.js +++ b/core/servers/chat/mrc_multiplexer.js @@ -219,7 +219,8 @@ exports.getModule = class MrcModule extends ServerModule { connectedSockets.forEach(client => { if ( message.to_user == '' || - message.to_user == client.username || + // Fix PrivMSG delivery on case mismatch + message.to_user.toUpperCase() == client.username.toUpperCase() || message.to_user == 'CLIENT' || message.from_user == client.username || message.to_user == 'NOTME' diff --git a/misc/config_template.in.hjson b/misc/config_template.in.hjson index b1001bd4..1a30842d 100644 --- a/misc/config_template.in.hjson +++ b/misc/config_template.in.hjson @@ -315,6 +315,8 @@ chatServers: { // multi relay chat settings. No need to sign up, just enable it. // More info: https://bbswiki.bottomlessabyss.net/index.php?title=MRC_Chat_platform + // Make sure to adjust 'prettyBoardName' to your liking in your config before enabling + mrc: { enabled : false serverHostname : 'mrc.bottomlessabyss.net'