diff --git a/mods/ctf_match/chat.lua b/mods/ctf_match/chat.lua index 5a5e2d9..de9f8ea 100644 --- a/mods/ctf_match/chat.lua +++ b/mods/ctf_match/chat.lua @@ -40,7 +40,7 @@ minetest.register_chatcommand("ctf_respawn", { local restart_on_next_match = false local restart_on_next_match_by = nil minetest.register_chatcommand("ctf_queue_restart", { - description = "Respawn a player (clean inv, send to base)", + description = "Queue server restart", privs = { server = true }, @@ -51,6 +51,17 @@ minetest.register_chatcommand("ctf_queue_restart", { end }) +minetest.register_chatcommand("ctf_unqueue_restart", { + description = "Unqueue server restart", + privs = { + server = true + }, + func = function(name, param) + restart_on_next_match = false + return true, "Restart cancelled." + end +}) + ctf_match.register_on_new_match(function() if restart_on_next_match then minetest.chat_send_player(restart_on_next_match_by, "Shutting down now!")