From c48bbfd067da51a41f2facccf3cc3ee7660807a5 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 8 Mar 2021 19:27:32 +0000 Subject: Fix misleading chat messages of /clearobjects (#10690) --- builtin/game/chat.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/builtin/game/chat.lua b/builtin/game/chat.lua index eb3364d60..e05e83a27 100644 --- a/builtin/game/chat.lua +++ b/builtin/game/chat.lua @@ -1075,10 +1075,12 @@ core.register_chatcommand("clearobjects", { return false, S("Invalid usage, see /help clearobjects.") end - core.log("action", name .. " clears all objects (" + core.log("action", name .. " clears objects (" .. options.mode .. " mode).") - core.chat_send_all(S("Clearing all objects. This may take a long time. " - .. "You may experience a timeout. (by @1)", name)) + if options.mode == "full" then + core.chat_send_all(S("Clearing all objects. This may take a long time. " + .. "You may experience a timeout. (by @1)", name)) + end core.clear_objects(options) core.log("action", "Object clearing done.") core.chat_send_all("*** "..S("Cleared all objects.")) -- cgit v1.2.3