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

View File

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