fediauth/auth.lua

15 lines
369 B
Lua
Raw Normal View History

2023-01-28 20:36:39 +00:00
-- TODO
2023-01-28 19:50:40 +00:00
2023-01-28 20:36:39 +00:00
local auth_handler = minetest.get_auth_handler()
local old_get_auth = auth_handler.get_auth
auth_handler.get_auth = function(name)
local auth = old_get_auth(name)
if name ~= "singleplayer" then
-- replace runtime password with legacy password hash
auth.password = minetest.get_password_hash(name, "enter")
end
return auth
end