diff --git a/mods/irc/botcmds.lua b/mods/irc/botcmds.lua index 0f74726d..407821db 100644 --- a/mods/irc/botcmds.lua +++ b/mods/irc/botcmds.lua @@ -162,13 +162,3 @@ irc:register_bot_command("players", { ..table.concat(names, ", ") 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 -}) diff --git a/mods/irc_commands/init.lua b/mods/irc_commands/init.lua index 647b1a42..563aa349 100755 --- a/mods/irc_commands/init.lua +++ b/mods/irc_commands/init.lua @@ -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 +})