mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-28 00:47:13 +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()) {
|
for (const instance of this.controller.instances.values()) {
|
||||||
const pluginLoaded = instance.config.get("player_auth.load_plugin");
|
const pluginLoaded = instance.config.get("player_auth.load_plugin");
|
||||||
const assignedHost = instance.config.get("instance.assigned_host");
|
const assignedHost = instance.config.get("instance.assigned_host");
|
||||||
if (instance.status !== "running" || !pluginLoaded || !assignedHost) {
|
if (instance.status !== "running" || !pluginLoaded || assignedHost === null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ export class ControllerPlugin extends BaseControllerPlugin {
|
|||||||
servers.push({
|
servers.push({
|
||||||
name: settings["name"] as string || "unnamed server",
|
name: settings["name"] as string || "unnamed server",
|
||||||
factorioVersion: instance.factorioVersion,
|
factorioVersion: instance.factorioVersion,
|
||||||
address: includeAddress ? address : undefined,
|
address: (includeAddress && host.publicAddress !== "") ? address : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export class PlayerAuthServer {
|
|||||||
json.address = this.address;
|
json.address = this.address;
|
||||||
}
|
}
|
||||||
if (this.factorioVersion !== undefined) {
|
if (this.factorioVersion !== undefined) {
|
||||||
json.factorioVersion = this.address;
|
json.factorioVersion = this.factorioVersion;
|
||||||
}
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user