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:
Dorian Wouters 2016-08-23 14:31:59 +02:00
parent 2a56743f65
commit d7fba610a1
No known key found for this signature in database
GPG Key ID: 6E9DA8063322434B
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
minetest.register_privilege("megabuilder","Can protect an infinite amount of areas.")
function areas:player_exists(name)
return minetest.auth_table[name] ~= nil
return minetest.get_auth_handler().get_auth(name) ~= nil
end
-- Save the areas table to a file