1
0

Show "motd" instead of server status when a player join

This commit is contained in:
Maksim 2022-02-13 13:43:38 +02:00
parent 5eab298e51
commit 2102765483

View File

@ -59,9 +59,13 @@ end
core.register_on_joinplayer(function(player) core.register_on_joinplayer(function(player)
local player_name = player:get_player_name() local player_name = player:get_player_name()
if not core.is_singleplayer() then if not core.is_singleplayer() then
local status = core.get_server_status(player_name, true) -- local status = core.get_server_status(player_name, true)
if status and status ~= "" then -- if status and status ~= "" then
core.chat_send_player(player_name, status) -- core.chat_send_player(player_name, status)
-- end
local motd = core.settings:get("motd")
if motd ~= "" then
core.chat_send_player(player_name, "# Server: " .. motd)
end end
end end
core.send_join_message(player_name) core.send_join_message(player_name)