1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-30 22:00:22 +02:00

change enable_non_player_action_log to log_non_player_actions

This commit is contained in:
nixnoxus
2022-04-21 12:43:24 +02:00
parent 9159e5fd84
commit 90591c5a49
4 changed files with 5 additions and 5 deletions

View File

@ -719,14 +719,14 @@ end
-- Log API / helpers
--
local non_player_action_log = minetest.settings:get_bool("enable_non_player_action_log") ~= false
local log_non_player_actions = minetest.settings:get_bool("log_non_player_actions") ~= false
function default.log_player_action(player, pos, message)
local who = player:get_player_name()
if not player.is_fake_player and player:is_player() then
-- log action of real player
minetest.log("action", who .. " " .. message .. " at " .. minetest.pos_to_string(pos))
elseif non_player_action_log then
elseif log_non_player_actions then
-- log action of non real player
who = who .. "(" .. (type(player.is_fake_player) == "string"
and player.is_fake_player or "*").. ")"