mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13: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
@@ -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