Fix unable to join server first time with a password
authorPerttu Ahola <celeron55@gmail.com>
Mon, 9 Apr 2012 08:24:35 +0000 (11:24 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 9 Apr 2012 08:24:35 +0000 (11:24 +0300)
builtin/auth.lua

index 0d450392592374cd5aaee24cf4ec9d5371cccb54..b6cca609c8619e36935664e5b1d2853ab65d85dc 100644 (file)
@@ -84,12 +84,9 @@ minetest.builtin_auth_handler = {
                -- always has an empty password, otherwise use default, which is
                -- usually empty too)
                local new_password_hash = ""
-               if not minetest.is_singleplayer() then
-                       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 in authentication table, return nil
                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
                -- Figure out what privileges the player should have.
                -- Take a copy of the privilege table