mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Address feedback
* Fix typo in toJSON * Handle the case of hostId being 0 * Hide address when host address is empty string
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -52,7 +52,7 @@ export class ControllerPlugin extends BaseControllerPlugin {
|
||||
for (const instance of this.controller.instances.values()) {
|
||||
const pluginLoaded = instance.config.get("player_auth.load_plugin");
|
||||
const assignedHost = instance.config.get("instance.assigned_host");
|
||||
if (instance.status !== "running" || !pluginLoaded || !assignedHost) {
|
||||
if (instance.status !== "running" || !pluginLoaded || assignedHost === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ export class ControllerPlugin extends BaseControllerPlugin {
|
||||
servers.push({
|
||||
name: settings["name"] as string || "unnamed server",
|
||||
factorioVersion: instance.factorioVersion,
|
||||
address: includeAddress ? address : undefined,
|
||||
address: (includeAddress && host.publicAddress !== "") ? address : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export class PlayerAuthServer {
|
||||
json.address = this.address;
|
||||
}
|
||||
if (this.factorioVersion !== undefined) {
|
||||
json.factorioVersion = this.address;
|
||||
json.factorioVersion = this.factorioVersion;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user