renamed to nameserver in kernel settings

This commit is contained in:
Niklas Kapelle 2024-03-21 00:02:57 +01:00
parent 9541b653b5
commit 1efa8fa212
Signed by: niklas
GPG Key ID: 4EB651B36D841D16
2 changed files with 13 additions and 13 deletions

View File

@ -17,8 +17,8 @@ class KSettings extends CLIAppBase {
var value = switch (key) { var value = switch (key) {
case "hostname": case "hostname":
KernelSettings.hostname; KernelSettings.hostname;
case "sitecontroller": case "nameServer":
Std.string(KernelSettings.siteController); Std.string(KernelSettings.nameServer);
default: default:
null; null;
} }
@ -50,8 +50,8 @@ class KSettings extends CLIAppBase {
switch (key) { switch (key) {
case "hostname": case "hostname":
KernelSettings.hostname = value; KernelSettings.hostname = value;
case "sitecontroller": case "nameServer":
KernelSettings.siteController = Std.parseInt(value); KernelSettings.nameServer = Std.parseInt(value);
default: default:
handle.writeLine("Key not found"); handle.writeLine("Key not found");
return false; return false;
@ -61,7 +61,7 @@ class KSettings extends CLIAppBase {
registerSyncSubcommand("list", (args) -> { registerSyncSubcommand("list", (args) -> {
handle.writeLine("hostname"); handle.writeLine("hostname");
handle.writeLine("sitecontroller"); handle.writeLine("nameServer");
return true; return true;
}); });
} }

View File

@ -39,20 +39,20 @@ class KernelSettings {
return value; return value;
} }
public static var siteController(get, set):NetworkID; public static var nameServer(get, set):NetworkID;
private static var _siteController:NetworkID = get("siteController"); private static var _nameServer:NetworkID = get("nameServer");
private static function get_siteController():NetworkID { private static function get_nameServer():NetworkID {
return _siteController; return _nameServer;
} }
private static function set_siteController(value:NetworkID):NetworkID { private static function set_nameServer(value:NetworkID):NetworkID {
if (value == null) { if (value == null) {
return get_siteController(); return get_nameServer();
} }
set("siteController", value); set("nameServer", value);
_siteController = value; _nameServer = value;
return value; return value;
} }
} }