make auth handling transparent
parent
b4aabcfc8b
commit
bb48bb0faf
4
init.lua
4
init.lua
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue