globalChat no longer breaks when the master is restarted

This commit is contained in:
Danielv123 committed 2018-05-26 13:16:59 +02:00
1 parent 47b74a07d1
commit e6c706a83e
1 file changed
+3 -1
+3 -1
View File
@@ -7,7 +7,9 @@ module.exports = class remoteCommands {
this.socket = extras.socket;
console.log(mergedConfig)
this.instances = {};
this.socket.emit("registerChatReciever");
this.socket.on("hello", () => this.socket.emit("registerChatReciever"));
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"))){