Add reason to kicked log message and use present tense
authorest31 <MTest31@outlook.com>
Sun, 5 Apr 2015 02:18:47 +0000 (04:18 +0200)
committerest31 <MTest31@outlook.com>
Sun, 5 Apr 2015 02:18:47 +0000 (04:18 +0200)
builtin/game/chatcommands.lua

index 2101178845fd2690d7b509c078a8ced405a7c5db..3b3c674f20d22b3278a46cdc8915628204fd0414 100644 (file)
@@ -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,
 })
@@ -804,5 +808,4 @@ core.register_chatcommand("last-login", {
                end
                return false, "Last login time is unknown"
        end,
-})
-
+})
\ No newline at end of file