From a5ef7d9da502f79055ecc774e4f93aa377b66dda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Jan 2023 18:29:34 +0000 Subject: [PATCH 1/3] Bump activesupport from 7.0.1 to 7.0.4.1 in /docs Bumps [activesupport](https://github.com/rails/rails) from 7.0.1 to 7.0.4.1. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.0.4.1/activesupport/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.0.1...v7.0.4.1) --- updated-dependencies: - dependency-name: activesupport dependency-type: indirect ... Signed-off-by: dependabot[bot] --- docs/Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 54554325..036fe106 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.0.1) + activesupport (7.0.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -9,7 +9,7 @@ GEM addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) colorator (1.1.0) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) cssminify2 (2.0.1) em-websocket (0.5.3) eventmachine (>= 0.12.9) @@ -24,7 +24,7 @@ GEM nokogiri (>= 1.4) htmlcompressor (0.4.0) http_parser.rb (0.8.0) - i18n (1.9.1) + i18n (1.12.0) concurrent-ruby (~> 1.0) jekyll (4.2.1) addressable (~> 2.4) @@ -76,7 +76,7 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) - minitest (5.15.0) + minitest (5.17.0) nokogiri (1.13.6-x86_64-linux) racc (~> 1.4) pathutil (0.16.2) @@ -93,7 +93,7 @@ GEM ffi (~> 1.9) terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) - tzinfo (2.0.4) + tzinfo (2.0.5) concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) From 9a4433ee0309d84622dcd0ba8e3923c2238779f4 Mon Sep 17 00:00:00 2001 From: Stack Fault Date: Fri, 31 Mar 2023 13:46:07 -0400 Subject: [PATCH 2/3] Fixed PrivMsg delivery + added new server commands --- core/mrc.js | 66 ++++++++++++++++++++++++++++ core/servers/chat/mrc_multiplexer.js | 3 +- misc/config_template.in.hjson | 2 + 3 files changed, 70 insertions(+), 1 deletion(-) 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' From 447be3552c69c3aaf75b004b488bbe9d8012c39c Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 8 Apr 2023 21:04:40 -0600 Subject: [PATCH 3/3] Better error handling --- core/servers/content/gopher.js | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/core/servers/content/gopher.js b/core/servers/content/gopher.js index 01642721..c8cfb021 100644 --- a/core/servers/content/gopher.js +++ b/core/servers/content/gopher.js @@ -557,17 +557,24 @@ exports.getModule = class GopherModule extends ServerModule { this.makeItem(ItemTypes.InfoMessage, `Messages in ${area.name}`), this.makeItem(ItemTypes.InfoMessage, '(newest first)'), this.makeItem(ItemTypes.InfoMessage, '-'.repeat(70)), - ...msgList.map(msg => - this.makeItem( + ...msgList.map(msg => { + let m; + try { + m = moment(msg.modTimestamp); + } catch (e) { + this.log.warn( + `Error parsing "${msg.modTimestamp}"; expected timestamp: ${e.message}` + ); + m = moment(); + } + return this.makeItem( ItemTypes.TextFile, - `${moment(msg.modTimestamp).format( - 'YYYY-MM-DD hh:mma' - )}: ${this.shortenSubject(msg.subject)} (${ - msg.fromUserName - } to ${msg.toUserName})`, + `${m.format('YYYY-MM-DD hh:mma')}: ${this.shortenSubject( + msg.subject + )} (${msg.fromUserName} to ${msg.toUserName})`, `/msgarea/${confTag}/${areaTag}/${msg.messageUuid}` - ) - ), + ); + }), ].join(''); this.log.debug({ confTag, areaTag }, 'Gopher serving message list');