1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-07-03 23:20:22 +02:00

no leading spaces before punctuation marks

This commit is contained in:
nixnoxus
2022-04-26 17:06:20 +02:00
parent 589bc4e5a4
commit 238a93fcb3

View File

@ -737,7 +737,10 @@ function default.log_player_action(player, ...)
and player.is_fake_player or "*").. ")"
end
for _, v in ipairs({...}) do
msg = msg .. " " .. (is_vector(v) and minetest.pos_to_string(v) or v)
-- translate vectors
local part = is_vector(v) and minetest.pos_to_string(v) or v
-- no leading spaces before punctuation marks
msg = msg .. (string.match(part, "^[;,.]") and "" or " ") .. part
end
minetest.log("action", msg)
end