Fixed PrivMsg delivery + added new server commands
This commit is contained in:
parent
3319b310d3
commit
9a4433ee03
66
core/mrc.js
66
core/mrc.js
|
@ -55,6 +55,8 @@ const helpText = `
|
|||
|03/|11topic |03<message> |08- |07Set the room topic
|
||||
|03/|11bbses |08& |03/|11info <id> |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<your message> |08- |07l337 5p34k
|
||||
|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'
|
||||
);
|
||||
}
|
||||
|
||||
// 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();
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue