2020-03-30 13:06:29 +02:00
|
|
|
|
2020-03-30 13:12:32 +02:00
|
|
|
local default_pw = minetest.settings:get("default_password")
|
2020-03-30 13:06:29 +02:00
|
|
|
|
|
|
|
minetest.register_on_joinplayer(function(player)
|
|
|
|
local playername = player:get_player_name()
|
|
|
|
local handler = minetest.get_auth_handler()
|
|
|
|
local entry = handler.get_auth(playername)
|
|
|
|
if entry and minetest.check_password_entry(playername, entry.password, default_pw) then
|
|
|
|
-- player has still the default password
|
|
|
|
minetest.chat_send_player(
|
|
|
|
playername,
|
2020-07-22 15:59:43 +02:00
|
|
|
minetest.colorize("#ff0000", "WARNING: You are using the default password! " ..
|
|
|
|
"Please change it for your own safety!" ..
|
2020-07-22 15:58:15 +02:00
|
|
|
"(press the escape-button and click on 'change password')")
|
2020-03-30 13:06:29 +02:00
|
|
|
)
|
|
|
|
end
|
|
|
|
end)
|