make auth handling transparent

master
shivajiva101 2018-01-28 22:25:44 +00:00 committed by GitHub
parent b4aabcfc8b
commit bb48bb0faf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -5,7 +5,6 @@ with persistence of the last state across server restarts
]]
local mod_data = minetest.get_mod_storage()
local sauth_mod = minetest.get_modpath("sauth")
local border = "OPEN"
-- initialise
@ -45,8 +44,7 @@ minetest.register_on_prejoinplayer(function(name, ip)
return
end
-- stop NEW players from joining
local player = core.auth_table[name]
if sauth_mod then player = sauth.get_auth(name, false) end -- no caching
local player = minetest.get_auth_handler().get_auth(name)
if border == "CLOSED" and not player then
return ("\nSorry, no new players being admitted at this time!")
end