From 50370bf858d2c53dcde657c36a28433b1e78d051 Mon Sep 17 00:00:00 2001 From: Master-Guy <566429+Master-Guy@users.noreply.github.com> Date: Wed, 17 Jul 2019 18:35:02 +0200 Subject: [PATCH 1/3] 1/2 Add "info" field between client and master Adds a "info" field to config.json and allows the client to send the contents of this info field to the master, so it also shows up (i.e. with /api/slaves) --- client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/client.js b/client.js index ce67a6a8..f1fe4e41 100644 --- a/client.js +++ b/client.js @@ -673,6 +673,7 @@ async function instanceManagement(instanceconfig) { publicIP: config.publicIP, // IP of the server should be global for all instances, so we pull that straight from the config mods:modHashes, instanceName: instance, + info: instanceconfig.info, } if(playerCount){ payload.playerCount = playerCount.replace(/(\r\n\t|\n|\r\t)/gm, ""); From c9cbc48d95142a50ab26cd8e4564e554cd4d4013 Mon Sep 17 00:00:00 2001 From: Master-Guy <566429+Master-Guy@users.noreply.github.com> Date: Wed, 17 Jul 2019 18:40:01 +0200 Subject: [PATCH 2/3] 2/2 Add "info" field between client and master Adds a "info" field to config.json and allows the client to send the contents of this info field to the master, so it also shows up (i.e. with /api/slaves) --- client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/client.js b/client.js index f1fe4e41..2f755780 100644 --- a/client.js +++ b/client.js @@ -317,6 +317,7 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n "clientPort": args["rcon-port"] || process.env.RCONPORT || Math.floor(Math.random() * 65535), "__comment_clientPassword": "This is the rcon password. Its also used for making an instanceID. Make sure its unique and not blank.", "clientPassword": args["rcon-password"] || Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 8), + "info": {}, } console.log("Clusterio | Created instance with settings:") console.log(instconf); From 6ac8c0711f20d516c56f5e5c4602018009fe1d5d Mon Sep 17 00:00:00 2001 From: Master-Guy <566429+Master-Guy@users.noreply.github.com> Date: Wed, 17 Jul 2019 19:23:53 +0200 Subject: [PATCH 3/3] JSON fix Small fix for JSON --- client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.js b/client.js index 2f755780..9f4427b6 100644 --- a/client.js +++ b/client.js @@ -317,7 +317,7 @@ write-data=${ path.resolve(config.instanceDirectory, instance) }\r\n "clientPort": args["rcon-port"] || process.env.RCONPORT || Math.floor(Math.random() * 65535), "__comment_clientPassword": "This is the rcon password. Its also used for making an instanceID. Make sure its unique and not blank.", "clientPassword": args["rcon-password"] || Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 8), - "info": {}, + "info": {} } console.log("Clusterio | Created instance with settings:") console.log(instconf);