Fix misleading chat messages of /clearobjects (#10690)

This commit is contained in:
Wuzzy 2021-03-08 19:27:32 +00:00 committed by GitHub
parent 176f5866cb
commit c48bbfd067
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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."))