diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-12-12 14:49:19 -0500 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2017-05-06 15:33:19 -0400 |
commit | 43d1f375d18a2fbc547a9b4f23d1354d645856ca (patch) | |
tree | 15de6977737b440b9d265f85dc1fe3c71e996a45 /builtin/game/auth.lua | |
parent | a024042bf5ad487685e952da7b96ffa845cd7731 (diff) | |
download | minetest-43d1f375d18a2fbc547a9b4f23d1354d645856ca.tar.gz minetest-43d1f375d18a2fbc547a9b4f23d1354d645856ca.tar.bz2 minetest-43d1f375d18a2fbc547a9b4f23d1354d645856ca.zip |
Use a settings object for the main settings
This unifies the settings APIs.
This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
Diffstat (limited to 'builtin/game/auth.lua')
-rw-r--r-- | builtin/game/auth.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/game/auth.lua b/builtin/game/auth.lua index 46fe3d342..8cb4ebf57 100644 --- a/builtin/game/auth.lua +++ b/builtin/game/auth.lua @@ -106,7 +106,7 @@ core.builtin_auth_handler = { end end -- For the admin, give everything - elseif name == core.setting_get("name") then + elseif name == core.settings:get("name") then for priv, def in pairs(core.registered_privileges) do privileges[priv] = true end @@ -125,7 +125,7 @@ core.builtin_auth_handler = { core.log('info', "Built-in authentication handler adding player '"..name.."'") core.auth_table[name] = { password = password, - privileges = core.string_to_privs(core.setting_get("default_privs")), + privileges = core.string_to_privs(core.settings:get("default_privs")), last_login = os.time(), } save_auth_file() @@ -148,7 +148,7 @@ core.builtin_auth_handler = { if not core.auth_table[name] then core.builtin_auth_handler.create_auth(name, core.get_password_hash(name, - core.setting_get("default_password"))) + core.settings:get("default_password"))) end core.auth_table[name].privileges = privileges core.notify_authentication_modified(name) |