researchSync: Fixed sending commands with newlines

This commit is contained in:
Danielv123 committed 2018-04-13 18:31:01 +02:00
1 parent 2d5c0c3bbf
commit c9bd26a01e
1 file changed
+2 -2
+2 -2
View File
@@ -4,9 +4,9 @@ const needle = require("needle");
class ResearchSync {
constructor(slaveConfig, messageInterface, extras = {}){
this.functions = this.loadFunctions();
this.config = slaveConfig;
this.messageInterface = messageInterface;
this.functions = this.loadFunctions();
this.research = {};
@@ -87,7 +87,7 @@ class ResearchSync {
}
loadFunc(path) {
return fs.readFileSync("sharedPlugins/researchSync/" + path,'utf-8').replace(/\r\n/g,' ');
return fs.readFileSync("sharedPlugins/researchSync/" + path,'utf-8').replace(/\r?\n|\r/g,' ');
}
scriptOutput(data){
try {