mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Implement delayed server shutdown with cancelation (#4664)
This commit is contained in:
parent
0f955bf7fa
commit
34d32ce55a
8 changed files with 124 additions and 14 deletions
|
@ -33,7 +33,8 @@ int ModApiServer::l_request_shutdown(lua_State *L)
|
|||
NO_MAP_LOCK_REQUIRED;
|
||||
const char *msg = lua_tolstring(L, 1, NULL);
|
||||
bool reconnect = lua_toboolean(L, 2);
|
||||
getServer(L)->requestShutdown(msg ? msg : "", reconnect);
|
||||
float seconds_before_shutdown = lua_tonumber(L, 3);
|
||||
getServer(L)->requestShutdown(msg ? msg : "", reconnect, seconds_before_shutdown);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue