]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Nicer time setting logging
authorest31 <MTest31@outlook.com>
Tue, 2 Jun 2015 04:45:21 +0000 (06:45 +0200)
committerest31 <MTest31@outlook.com>
Tue, 2 Jun 2015 04:49:05 +0000 (06:49 +0200)
Now logs

ACTION[ServerThread]: player sets time to 6:03

instead of

ACTION[ServerThread]: player sets time to 6:3

builtin/game/chatcommands.lua

index fbc91ef01f90b28e3fcbe092bf48cc34c074901d..d5d9c3d259600b5b2995d2880602fe17d1f3663e 100644 (file)
@@ -713,7 +713,7 @@ core.register_chatcommand("time", {
                        return false, "Invalid minute (must be between 0 and 59 inclusive)."
                end
                core.set_timeofday((hour * 60 + minute) / 1440)
-               core.log("action", name .. " sets time to " .. hour .. ":" .. minute)
+               core.log("action", ("%s sets time to %d:%02d"):format(name, hour, minute))
                return true, "Time of day changed."
        end,
 })