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 67507c7591
commit 2218f34c4e
No known key found for this signature in database
GPG Key ID: 6E9DA8063322434B
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
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