From cf7af193703b0ecdb4dab725287ce866c399a6ea Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Mon, 16 Apr 2018 06:43:22 +0200 Subject: [PATCH] Don't send corrupt factorio file outputs to plugins --- client.js | 2 +- sharedPlugins/researchSync/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client.js b/client.js index 37492b65..d87966af 100644 --- a/client.js +++ b/client.js @@ -483,7 +483,7 @@ function instanceManagement() { fs.writeFileSync(instancedirectory + "/script-output/" + filename, ""); } for(let i = 0; i < stuff.length; i++) { - if(stuff[i]) { + if(stuff[i] && !stuff[i].includes('\u0000\u0000')) { plugins[I].scriptOutput(stuff[i]); } } diff --git a/sharedPlugins/researchSync/index.js b/sharedPlugins/researchSync/index.js index f4246816..766eea22 100644 --- a/sharedPlugins/researchSync/index.js +++ b/sharedPlugins/researchSync/index.js @@ -63,7 +63,7 @@ class ResearchSync { } }) if(Object.keys(difference).length > 0){ - this.messageInterface("difference from other servers", difference); + this.messageInterface("difference from other servers", JSON.stringify(difference)); } needle.post(this.config.masterIP + ':' + this.config.masterPort + '/api/editSlaveMeta', { instanceID: this.config.unique,