Skip to content

Commit fedbbc8

Browse files
committedApr 5, 2015
Add reason to kicked log message and use present tense
1 parent 1cb4045 commit fedbbc8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎builtin/game/chatcommands.lua

+6-3
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,11 @@ core.register_chatcommand("kick", {
749749
if not core.kick_player(tokick, reason) then
750750
return false, "Failed to kick player " .. tokick
751751
end
752-
core.log("action", name .. " kicked " .. tokick)
752+
local log_reason = ""
753+
if reason then
754+
log_reason = " with reason \"" .. reason .. "\""
755+
end
756+
core.log("action", name .. " kicks " .. tokick .. log_reason)
753757
return true, "Kicked " .. tokick
754758
end,
755759
})
@@ -804,5 +808,4 @@ core.register_chatcommand("last-login", {
804808
end
805809
return false, "Last login time is unknown"
806810
end,
807-
})
808-
811+
})

0 commit comments

Comments
 (0)
Please sign in to comment.