mirror of
https://git.phreedom.club/localhost_frssoft/fediauth.git
synced 2024-11-21 23:41:27 +00:00
runtime auth handler password override
This commit is contained in:
parent
9b43a014ce
commit
bb06a28048
14
auth.lua
14
auth.lua
|
@ -1 +1,15 @@
|
|||
-- TODO
|
||||
|
||||
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
|
Loading…
Reference in a new issue