1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-26 18:21:04 +00:00

Luanti rename: builtin (#15324)

This commit is contained in:
Wuzzy 2024-10-28 19:40:18 +01:00 committed by GitHub
parent 409e75b94d
commit ad4b13a0e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
69 changed files with 77 additions and 112 deletions

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/auth.lua
--
-- Builtin authentication handler
--
@ -95,11 +93,11 @@ core.builtin_auth_handler = {
for priv, value in pairs(privileges) do
-- Warnings for improper API usage
if value == false then
core.log('deprecated', "`false` value given to `minetest.set_player_privs`, "..
core.log('deprecated', "`false` value given to `core.set_player_privs`, "..
"this is almost certainly a bug, "..
"granting a privilege rather than revoking it")
elseif value ~= true then
core.log('deprecated', "non-`true` value given to `minetest.set_player_privs`")
core.log('deprecated', "non-`true` value given to `core.set_player_privs`")
end
-- Run grant callbacks
if prev_privs[priv] == nil then
@ -196,7 +194,7 @@ function core.change_player_privs(name, changes)
elseif change == false then
privs[priv] = nil
else
error("non-bool value given to `minetest.change_player_privs`")
error("non-bool value given to `core.change_player_privs`")
end
end
core.set_player_privs(name, privs)