Add /time
This commit is contained in:
@@ -10,6 +10,11 @@ function send_messages(res)
|
||||
end
|
||||
http_api.fetch_async({url = "http://localhost:" .. port .. "/sendCode",
|
||||
post_data = {message = text}})
|
||||
elseif message == "time" then
|
||||
local x = minetest.get_timeofday()
|
||||
local text = string.format("%02d:%02d", math.floor(x*24), math.floor((x*24*60) % 60))
|
||||
http_api.fetch_async({url = "http://localhost:" .. port .. "/sendCode",
|
||||
post_data = {message = text}})
|
||||
else
|
||||
minetest.chat_send_all(message)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user