Fix unable to join server first time with a password
parent
e4485f5412
commit
3214daca4c
|
@ -84,12 +84,9 @@ minetest.builtin_auth_handler = {
|
||||||
-- always has an empty password, otherwise use default, which is
|
-- always has an empty password, otherwise use default, which is
|
||||||
-- usually empty too)
|
-- usually empty too)
|
||||||
local new_password_hash = ""
|
local new_password_hash = ""
|
||||||
if not minetest.is_singleplayer() then
|
-- If not in authentication table, return nil
|
||||||
new_password_hash = minetest.get_password_hash(name, minetest.setting_get("default_password"))
|
|
||||||
end
|
|
||||||
-- Add player to authentication table if not there already
|
|
||||||
if not minetest.auth_table[name] then
|
if not minetest.auth_table[name] then
|
||||||
minetest.builtin_auth_handler.create_auth(name, minetest.get_password_hash(name, minetest.setting_get("default_password")))
|
return nil
|
||||||
end
|
end
|
||||||
-- Figure out what privileges the player should have.
|
-- Figure out what privileges the player should have.
|
||||||
-- Take a copy of the privilege table
|
-- Take a copy of the privilege table
|
||||||
|
|
Loading…
Reference in New Issue