mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 07:24:52 +09:00
researchSync: Fixed sending commands with newlines
This commit is contained in:
1 parent
2d5c0c3bbf
commit
c9bd26a01e
1 file changed
+2
-2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user