mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33:12 +09:00
Added config settings for globalChat (broadcast all messages)
This commit is contained in:
1 parent
ca49564fb7
commit
cf0c3b012a
2 files changed
+8
-2
No files matched your search
+3
-1
@@ -49,5 +49,7 @@
|
||||
"logItemTransfers": false,
|
||||
"uploadModsToMaster": true,
|
||||
"msBetweenCommands": 10,
|
||||
"allowRemoteCommandExecution": true
|
||||
"allowRemoteCommandExecution": true,
|
||||
"enableCrossServerShout": true,
|
||||
"mirrorAllChat": false
|
||||
}
|
||||
@@ -11,7 +11,11 @@ module.exports = class remoteCommands {
|
||||
|
||||
this.socket.on("gameChat", async data => {
|
||||
if(data.instanceID && data.instanceID != this.config.unique.toString()){
|
||||
if(data.data.includes("[CHAT]") && (data.data.toLowerCase().includes("/shout") || data.data.toLowerCase().includes("!shout"))){
|
||||
if(data.data.includes("[CHAT]")
|
||||
// check if we are allowed to cross chat at all, default to true
|
||||
&& (mergedConfig.enableCrossServerShout == undefined || mergedConfig.enableCrossServerShout)
|
||||
// check if we are supposed to relay this message
|
||||
&& (mergedConfig.mirrorAllChat || data.data.toLowerCase().includes("/shout") || data.data.toLowerCase().includes("!shout"))){
|
||||
let words = data.data.trim().split(" ");
|
||||
words.shift();
|
||||
words.shift();
|
||||
|
||||
Reference in new issue
Block a user