diff --git a/sharedPlugins/remoteCommands/index.js b/sharedPlugins/remoteCommands/index.js index 2e30026c..98dc11a6 100644 --- a/sharedPlugins/remoteCommands/index.js +++ b/sharedPlugins/remoteCommands/index.js @@ -1,6 +1,5 @@ module.exports = class remoteCommands { constructor(mergedConfig, messageInterface, extras){ - console.log = messageInterface; this.messageInterface = messageInterface; this.config = mergedConfig; this.socket = extras.socket; diff --git a/sharedPlugins/researchSync/index.js b/sharedPlugins/researchSync/index.js index 9da88351..3a0e232c 100644 --- a/sharedPlugins/researchSync/index.js +++ b/sharedPlugins/researchSync/index.js @@ -3,24 +3,22 @@ const needle = require("needle"); class ResearchSync { - constructor(slaveConfig, messageInterface){ this.functions = this.loadFunctions(); this.config = slaveConfig; this.messageInterface = messageInterface; - console.log = messageInterface; this.research = {}; messageInterface("ResearchSync enabled"); setInterval(() => { + this.doSync(); this.pollResearch(); - setTimeout(this.doSync, 2) - }, 2000); + }, 30000); } pollResearch() { - this.messageInterface("Polling Research\n") + // this.messageInterface("Polling Research\n") this.messageInterface(this.functions.dumpResearch); } @@ -59,8 +57,9 @@ class ResearchSync { // this.messageInterface("/c game.forces['player'].technologies['" + key + "'].researched=true"); } }) - - console.log("difference from other servers", difference); + if(Object.keys(difference).length > 0){ + this.messageInterface("difference from other servers", difference); + } needle.post(this.config.masterIP + ':' + this.config.masterPort + '/api/editSlaveMeta', { instanceID: this.config.unique, password: this.config.clientPassword,