diff --git a/client.js b/client.js index 8310c9bf..21723d66 100644 --- a/client.js +++ b/client.js @@ -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]); }); diff --git a/master.js b/master.js index 25d47a5e..9b0b5f93 100644 --- a/master.js +++ b/master.js @@ -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){