mirror of
https://github.com/minetest/minetest.git
synced 2025-04-22 18:20:05 +02:00
Add reason to kicked log message and use present tense
This commit is contained in:
@ -749,7 +749,11 @@ core.register_chatcommand("kick", {
|
|||||||
if not core.kick_player(tokick, reason) then
|
if not core.kick_player(tokick, reason) then
|
||||||
return false, "Failed to kick player " .. tokick
|
return false, "Failed to kick player " .. tokick
|
||||||
end
|
end
|
||||||
core.log("action", name .. " kicked " .. tokick)
|
local log_reason = ""
|
||||||
|
if reason then
|
||||||
|
log_reason = " with reason \"" .. reason .. "\""
|
||||||
|
end
|
||||||
|
core.log("action", name .. " kicks " .. tokick .. log_reason)
|
||||||
return true, "Kicked " .. tokick
|
return true, "Kicked " .. tokick
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -805,4 +809,3 @@ core.register_chatcommand("last-login", {
|
|||||||
return false, "Last login time is unknown"
|
return false, "Last login time is unknown"
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user