mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 01:30:38 +01:00
Timeofday IRC command was in the wrong place, replace it in /mods/irc_commands/init.lua
This commit is contained in:
parent
d042026d0d
commit
3e154e7806
@ -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
|
||||
})
|
||||
|
@ -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
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user