mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 07:24:52 +09:00
Fixed export statistics being logged under "unknown"
This commit is contained in:
1 parent
bfbe7e7d1c
commit
0dd6315abc
2 files changed
+3
-6
No files matched your search
@@ -545,7 +545,7 @@ function instanceManagement() {
|
||||
name: g[0],
|
||||
count: g[1],
|
||||
instanceName: instance, // name of instance
|
||||
unique: instanceconfig.unique, // a hash computed from the randomly generated rcon password
|
||||
instanceID: instanceconfig.unique, // a hash computed from the randomly generated rcon password
|
||||
}, function (err, resp, body) {
|
||||
if(body == "failure") console.error("#### Export failed! Lost: "+g[1]+" "+g[0]);
|
||||
});
|
||||
|
||||
@@ -231,15 +231,12 @@ app.post("/api/place", function(req, res) {
|
||||
if(!x.instanceID) {
|
||||
x.instanceID = "unknown";
|
||||
}
|
||||
if(!x.unique) {
|
||||
x.unique = "unknown";
|
||||
}
|
||||
if( x.unique
|
||||
if( x.instanceID
|
||||
&& x.instanceName
|
||||
&& !isNaN(Number(x.count))// This is in no way a proper authentication or anything, its just to make sure everybody are registered as slaves before modifying the cluster (or not, to maintain backwards compat)
|
||||
/*&& stringUtils.hashCode(slaves[x.unique].rconPassword) == x.unique*/){
|
||||
|
||||
console.log("added: " + req.body.name + " " + req.body.count+" from "+x.instanceName+" ("+x.unique+")");
|
||||
console.log("added: " + req.body.name + " " + req.body.count+" from "+x.instanceName+" ("+x.instanceID+")");
|
||||
// gather statistics
|
||||
let recievedItemStatistics = recievedItemStatisticsBySlaveID[x.instanceID];
|
||||
if(recievedItemStatistics === undefined){
|
||||
|
||||
Reference in new issue
Block a user