This commit is contained in:
Gaël Chrétien 2015-05-02 19:10:04 +00:00
commit 448191d76b
1 changed files with 9 additions and 0 deletions

View File

@ -133,3 +133,12 @@ irc:register_bot_command("say", {
end
})
irc:register_bot_command("timeofday", {
description = "Tell the in-game time of day",
func = function(user, args)
local timeofday = minetest.get_timeofday()
local hours, minutes = math.modf(timeofday * 24)
minutes = math.floor(minutes * 60)
return true, "It's " .. hours .. " h " .. minutes .. " min."
end
})