From 6f22d14206824911b620ecec450689f84e6d278b Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 1 Jul 2018 12:31:28 +0200 Subject: Make the server status message customizable (#7357) Remove now redundant setting show_statusline_on_connect Improve documentation of `minetest.get_server_status` --- doc/lua_api.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc/lua_api.txt') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 9fb22556b..d7f45fb1b 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -3997,7 +3997,13 @@ These functions return the leftover itemstack. Negative delay cancels the current active shutdown. Zero delay triggers an immediate shutdown. * `minetest.cancel_shutdown_requests()`: cancel current delayed shutdown -* `minetest.get_server_status()`: returns server status string +* `minetest.get_server_status(name, joined)` + * Returns the server status string when a player joins or when the command + `/status` is called. Returns `nil` or an empty string when the message is + disabled. + * `joined`: Boolean value, indicates whether the function was called when + a player joined. + * This function may be overwritten by mods to customize the status message. * `minetest.get_server_uptime()`: returns the server uptime in seconds * `minetest.remove_player(name)`: remove player from database (if they are not connected). -- cgit v1.2.3