mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
resolves #66 added setting to not upload mods to master
This commit is contained in:
1 parent
5dc71ad46e
commit
3f8a685f19
2 files changed
+25
-20
No files matched your search
@@ -591,19 +591,23 @@ function instanceManagement() {
|
|||||||
console.log("master has mod");
|
console.log("master has mod");
|
||||||
} else if (response && body && typeof body == "string") {
|
} else if (response && body && typeof body == "string") {
|
||||||
let mod = response.body;
|
let mod = response.body;
|
||||||
console.log("Sending mod: " + mod);
|
if(config.uploadModsToMaster){
|
||||||
// Send mods master says it wants
|
console.log("Sending mod: " + mod);
|
||||||
// response.body is a string which is a modName.zip
|
// Send mods master says it wants
|
||||||
var req = request.post("http://"+config.masterIP + ":" + config.masterPort + '/api/uploadMod', function (err, resp, body) {
|
// response.body is a string which is a modName.zip
|
||||||
if (err) {
|
var req = request.post("http://"+config.masterIP + ":" + config.masterPort + '/api/uploadMod', function (err, resp, body) {
|
||||||
console.log('Error!');
|
if (err) {
|
||||||
throw err
|
console.log('Error!');
|
||||||
} else {
|
throw err
|
||||||
console.log('URL: ' + body);
|
} else {
|
||||||
}
|
console.log('URL: ' + body);
|
||||||
});
|
}
|
||||||
var form = req.form();
|
});
|
||||||
form.append('file', fs.createReadStream("./instances/"+instance+"/mods/"+mod));
|
var form = req.form();
|
||||||
|
form.append('file', fs.createReadStream("./instances/"+instance+"/mods/"+mod));
|
||||||
|
} else {
|
||||||
|
console.log("Not sending mod: " + mod + " to master because config.uploadModsToMaster is not enabled")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-7
@@ -2,19 +2,19 @@
|
|||||||
"__comment": "Where factorio folder. Should be in the same folder as this config file.",
|
"__comment": "Where factorio folder. Should be in the same folder as this config file.",
|
||||||
"factorioDirectory": "factorio",
|
"factorioDirectory": "factorio",
|
||||||
|
|
||||||
"__comment": "IP players should connect to to join your servers, should be portforwarded and stuff",
|
"__comment1": "IP players should connect to to join your servers, should be portforwarded and stuff",
|
||||||
"publicIP": "localhost",
|
"publicIP": "localhost",
|
||||||
|
|
||||||
"__comment": "IP the master web server runs at, can be ignored on the master system",
|
"__comment2": "IP the master web server runs at, can be ignored on the master system",
|
||||||
"masterIP": "localhost",
|
"masterIP": "localhost",
|
||||||
"masterPort": 8080,
|
"masterPort": 8080,
|
||||||
|
|
||||||
"__comment": "Your factorio.com username for factorio MP services, also username will be admin",
|
"__comment3": "Your factorio.com username for factorio MP services, also username will be admin",
|
||||||
"username": "",
|
"username": "",
|
||||||
"__comment": "Token from your factorio.com profile page. Required for MP and mod manager services.",
|
"__comment4": "Token from your factorio.com profile page. Required for MP and mod manager services.",
|
||||||
"token": "",
|
"token": "",
|
||||||
|
|
||||||
"__comment": "General user settings",
|
"__comment5": "General user settings",
|
||||||
"verify_user_identity": false,
|
"verify_user_identity": false,
|
||||||
"auto_pause": false,
|
"auto_pause": false,
|
||||||
"allow_commands": "admins-only",
|
"allow_commands": "admins-only",
|
||||||
@@ -24,10 +24,11 @@
|
|||||||
"public": true,
|
"public": true,
|
||||||
"lan": true
|
"lan": true
|
||||||
},
|
},
|
||||||
"__comment": "Statistic gathering statistics, may affect server performance (master memory usage especially)",
|
"__comment6": "Statistic gathering statistics, may affect server performance (master memory usage especially)",
|
||||||
"itemStats": {
|
"itemStats": {
|
||||||
"maxEntries":60,
|
"maxEntries":60,
|
||||||
"entriesPerSecond": 0.01666666667
|
"entriesPerSecond": 0.01666666667
|
||||||
},
|
},
|
||||||
"logItemTransfers": false
|
"logItemTransfers": false,
|
||||||
|
"uploadModsToMaster": true
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user