Add setup-auth mod
This commit is contained in:
parent
c25470acdd
commit
4a49c16e9a
0
mods/setup-auth/depends.txt
Normal file
0
mods/setup-auth/depends.txt
Normal file
11
mods/setup-auth/init.lua
Normal file
11
mods/setup-auth/init.lua
Normal file
@ -0,0 +1,11 @@
|
||||
print("setup-path initialization")
|
||||
ENV_CTW_ADMIN_PASSWORD="CTW_ADMIN_PASSWORD"
|
||||
|
||||
if(os.getenv(ENV_CTW_ADMIN_PASSWORD ~= nil)) then
|
||||
minetest.set_player_password("player1",minetest.get_password_hash("player1","playon1"))
|
||||
minetest.set_player_password("admin",minetest.get_password_hash("admin",os.getenv(ENV_CTW_ADMIN_PASSWORD)))
|
||||
print("setup-path initialized !")
|
||||
else
|
||||
print("Authentication not initialized, please define "..ENV_CTW_ADMIN_PASSWORD.." !!")
|
||||
end
|
||||
|
3
mods/setup-auth/mod.conf
Normal file
3
mods/setup-auth/mod.conf
Normal file
@ -0,0 +1,3 @@
|
||||
name = setup-auth
|
||||
descriptions = Initializes to a default list of users and privileges
|
||||
depends =
|
Loading…
x
Reference in New Issue
Block a user