Skip to content

Commit

Permalink
Nicer time setting logging
Browse files Browse the repository at this point in the history
Now logs

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

instead of

ACTION[ServerThread]: player sets time to 6:3
  • Loading branch information
est31 committed Jun 2, 2015
1 parent e479337 commit b8a8be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/game/chatcommands.lua
Expand Up @@ -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,
})
Expand Down

1 comment on commit b8a8be9

@nerzhul
Copy link
Member

@nerzhul nerzhul commented on b8a8be9 Jun 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.