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 /doc | |
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 'doc')
-rw-r--r-- | doc/lua_api.txt | 8 |
1 files changed, 7 insertions, 1 deletions
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). |