mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 16:23:12 +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 {
|
class ResearchSync {
|
||||||
constructor(slaveConfig, messageInterface, extras = {}){
|
constructor(slaveConfig, messageInterface, extras = {}){
|
||||||
this.functions = this.loadFunctions();
|
|
||||||
this.config = slaveConfig;
|
this.config = slaveConfig;
|
||||||
this.messageInterface = messageInterface;
|
this.messageInterface = messageInterface;
|
||||||
|
this.functions = this.loadFunctions();
|
||||||
|
|
||||||
this.research = {};
|
this.research = {};
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ class ResearchSync {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadFunc(path) {
|
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){
|
scriptOutput(data){
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in new issue
Block a user