From 2102765483e87aa3e1ce3fd8027cb5d62fa7d627 Mon Sep 17 00:00:00 2001 From: Maksim Date: Sun, 13 Feb 2022 13:43:38 +0200 Subject: [PATCH] Show "motd" instead of server status when a player join --- builtin/game/misc.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua index 5871b102b..658c70a26 100644 --- a/builtin/game/misc.lua +++ b/builtin/game/misc.lua @@ -59,9 +59,13 @@ end core.register_on_joinplayer(function(player) local player_name = player:get_player_name() if not core.is_singleplayer() then - local status = core.get_server_status(player_name, true) - if status and status ~= "" then - core.chat_send_player(player_name, status) + -- local status = core.get_server_status(player_name, true) + -- if status and status ~= "" then + -- 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 core.send_join_message(player_name)