diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-07-01 12:31:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-01 12:31:28 +0200 |
commit | 6f22d14206824911b620ecec450689f84e6d278b (patch) | |
tree | fc639bddfc7e73e5479e6307d4e06039d94792fc /builtin/game/misc.lua | |
parent | 7d20ff47d7ce83825ccad81427fc8b45f80a2a2c (diff) | |
download | minetest-6f22d14206824911b620ecec450689f84e6d278b.tar.gz minetest-6f22d14206824911b620ecec450689f84e6d278b.tar.bz2 minetest-6f22d14206824911b620ecec450689f84e6d278b.zip |
Make the server status message customizable (#7357)
Remove now redundant setting show_statusline_on_connect
Improve documentation of `minetest.get_server_status`
Diffstat (limited to 'builtin/game/misc.lua')
-rw-r--r-- | builtin/game/misc.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua index 2e05cdc41..1d60f1958 100644 --- a/builtin/game/misc.lua +++ b/builtin/game/misc.lua @@ -62,6 +62,12 @@ end core.register_on_joinplayer(function(player) local player_name = player:get_player_name() player_list[player_name] = player + if not minetest.is_singleplayer() then + local status = core.get_server_status(player_name, true) + if status and status ~= "" then + core.chat_send_player(player_name, status) + end + end core.send_join_message(player_name) end) |