Skip to content

Commit

Permalink
Add reason to kicked log message and use present tense
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Apr 5, 2015
1 parent 1cb4045 commit fedbbc8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions builtin/game/chatcommands.lua
Expand Up @@ -749,7 +749,11 @@ core.register_chatcommand("kick", {
if not core.kick_player(tokick, reason) then
return false, "Failed to kick player " .. tokick
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
end,
})
Expand Down Expand Up @@ -804,5 +808,4 @@ core.register_chatcommand("last-login", {
end
return false, "Last login time is unknown"
end,
})

})

0 comments on commit fedbbc8

Please sign in to comment.