forked from nalc/areas
Don't use auth_table, use get_auth_handler().get_auth instead
No guarantee is made auth_table contains auth entries or even exists. Using this table directly is incompatible with auth handlers that don't cache auth entries (e.g. when they are stored in an SQL database supposed to be concurrently accessed and modified).
This commit is contained in:
parent
2a56743f65
commit
d7fba610a1
@ -2,7 +2,7 @@
|
|||||||
minetest.register_privilege("megabuilder","Can protect an infinite amount of areas.")
|
minetest.register_privilege("megabuilder","Can protect an infinite amount of areas.")
|
||||||
|
|
||||||
function areas:player_exists(name)
|
function areas:player_exists(name)
|
||||||
return minetest.auth_table[name] ~= nil
|
return minetest.get_auth_handler().get_auth(name) ~= nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Save the areas table to a file
|
-- Save the areas table to a file
|
||||||
|
Loading…
Reference in New Issue
Block a user