From 34d32ce55ae4f3f29d7b645075dc8efacb2c96d2 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Sat, 15 Apr 2017 23:19:18 +0200 Subject: Implement delayed server shutdown with cancelation (#4664) --- doc/lua_api.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 721f5448a..7b967726d 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2576,8 +2576,12 @@ These functions return the leftover itemstack. * Optional: Variable number of arguments that are passed to `func` ### Server -* `minetest.request_shutdown([message],[reconnect])`: request for server shutdown. Will display `message` to clients, - and `reconnect` == true displays a reconnect button. +* `minetest.request_shutdown([message],[reconnect],[delay])`: request for server shutdown. Will display `message` to clients, + `reconnect` == true displays a reconnect button, + `delay` adds an optional delay (in seconds) before shutdown + 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_uptime()`: returns the server uptime in seconds -- cgit v1.2.3