Merge branch 'master' of ssh://numinibsd/git/base/enigma-bbs into 459-activitypub-integration

This commit is contained in:
Bryan Ashby 2023-04-10 11:47:48 -06:00
commit d035fc5245
5 changed files with 91 additions and 15 deletions

View File

@ -55,6 +55,8 @@ const helpText = `
|03/|11topic |03<message> |08- |07Set the room topic |03/|11topic |03<message> |08- |07Set the room topic
|03/|11bbses |08& |03/|11info <id> |08- |07Info about BBS's connected |03/|11bbses |08& |03/|11info <id> |08- |07Info about BBS's connected
|03/|11meetups |08- |07Info about MRC MeetUps |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<your message> |08- |07l337 5p34k |03/|11l33t |03<your message> |08- |07l337 5p34k
|03/|11kewl |03<your message> |08- |07BBS KeWL SPeaK |03/|11kewl |03<your message> |08- |07BBS KeWL SPeaK
@ -375,6 +377,18 @@ exports.getModule = class mrcModule extends MenuModule {
'|08' + currentTime + '|00 ' + message.body + '|00' '|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); this.viewControllers.mrcChat.switchFocus(MciViewIds.mrcChat.inputArea);
@ -540,6 +554,58 @@ exports.getModule = class mrcModule extends MenuModule {
this.sendServerMessage('LIST'); this.sendServerMessage('LIST');
break; 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': case 'quit':
return this.prevMenu(); return this.prevMenu();

View File

@ -219,7 +219,8 @@ exports.getModule = class MrcModule extends ServerModule {
connectedSockets.forEach(client => { connectedSockets.forEach(client => {
if ( if (
message.to_user == '' || 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.to_user == 'CLIENT' ||
message.from_user == client.username || message.from_user == client.username ||
message.to_user == 'NOTME' message.to_user == 'NOTME'

View File

@ -557,17 +557,24 @@ exports.getModule = class GopherModule extends ServerModule {
this.makeItem(ItemTypes.InfoMessage, `Messages in ${area.name}`), this.makeItem(ItemTypes.InfoMessage, `Messages in ${area.name}`),
this.makeItem(ItemTypes.InfoMessage, '(newest first)'), this.makeItem(ItemTypes.InfoMessage, '(newest first)'),
this.makeItem(ItemTypes.InfoMessage, '-'.repeat(70)), this.makeItem(ItemTypes.InfoMessage, '-'.repeat(70)),
...msgList.map(msg => ...msgList.map(msg => {
this.makeItem( 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, ItemTypes.TextFile,
`${moment(msg.modTimestamp).format( `${m.format('YYYY-MM-DD hh:mma')}: ${this.shortenSubject(
'YYYY-MM-DD hh:mma' msg.subject
)}: ${this.shortenSubject(msg.subject)} (${ )} (${msg.fromUserName} to ${msg.toUserName})`,
msg.fromUserName
} to ${msg.toUserName})`,
`/msgarea/${confTag}/${areaTag}/${msg.messageUuid}` `/msgarea/${confTag}/${areaTag}/${msg.messageUuid}`
) );
), }),
].join(''); ].join('');
this.log.debug({ confTag, areaTag }, 'Gopher serving message list'); this.log.debug({ confTag, areaTag }, 'Gopher serving message list');

View File

@ -1,7 +1,7 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
activesupport (7.0.1) activesupport (7.0.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2) i18n (>= 1.6, < 2)
minitest (>= 5.1) minitest (>= 5.1)
@ -9,7 +9,7 @@ GEM
addressable (2.8.0) addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0) colorator (1.1.0)
concurrent-ruby (1.1.9) concurrent-ruby (1.1.10)
cssminify2 (2.0.1) cssminify2 (2.0.1)
em-websocket (0.5.3) em-websocket (0.5.3)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
@ -24,7 +24,7 @@ GEM
nokogiri (>= 1.4) nokogiri (>= 1.4)
htmlcompressor (0.4.0) htmlcompressor (0.4.0)
http_parser.rb (0.8.0) http_parser.rb (0.8.0)
i18n (1.9.1) i18n (1.12.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jekyll (4.2.1) jekyll (4.2.1)
addressable (~> 2.4) addressable (~> 2.4)
@ -76,7 +76,7 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3) rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10) rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0) mercenary (0.4.0)
minitest (5.15.0) minitest (5.17.0)
nokogiri (1.13.6-x86_64-linux) nokogiri (1.13.6-x86_64-linux)
racc (~> 1.4) racc (~> 1.4)
pathutil (0.16.2) pathutil (0.16.2)
@ -93,7 +93,7 @@ GEM
ffi (~> 1.9) ffi (~> 1.9)
terminal-table (2.0.0) terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1) unicode-display_width (~> 1.1, >= 1.1.1)
tzinfo (2.0.4) tzinfo (2.0.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
uglifier (4.2.0) uglifier (4.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)

View File

@ -332,6 +332,8 @@
chatServers: { chatServers: {
// multi relay chat settings. No need to sign up, just enable it. // multi relay chat settings. No need to sign up, just enable it.
// More info: https://bbswiki.bottomlessabyss.net/index.php?title=MRC_Chat_platform // 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: { mrc: {
enabled : false enabled : false
serverHostname : 'mrc.bottomlessabyss.net' serverHostname : 'mrc.bottomlessabyss.net'