summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2021-03-08 19:27:32 +0000
committerGitHub <noreply@github.com>2021-03-08 20:27:32 +0100
commitc48bbfd067da51a41f2facccf3cc3ee7660807a5 (patch)
tree4a14a4f96ba7cea51c68a8e89f860f12b0e86e28
parent176f5866cbc8946c55a0a9bd0978a804ad310211 (diff)
downloadminetest-c48bbfd067da51a41f2facccf3cc3ee7660807a5.tar.gz
minetest-c48bbfd067da51a41f2facccf3cc3ee7660807a5.tar.bz2
minetest-c48bbfd067da51a41f2facccf3cc3ee7660807a5.zip
Fix misleading chat messages of /clearobjects (#10690)
-rw-r--r--builtin/game/chat.lua8
1 files 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."))