Unify core VS minetest
This commit is contained in:
parent
fe0be3e170
commit
dda80031da
3
init.lua
3
init.lua
@ -57,7 +57,7 @@ function send(user_name, message_text)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local function receive(dtime)
|
local function receive()
|
||||||
local url = "http://" .. address .. ":" .. port .. "/api/messages"
|
local url = "http://" .. address .. ":" .. port .. "/api/messages"
|
||||||
local timeout = 0
|
local timeout = 0
|
||||||
|
|
||||||
@ -69,7 +69,6 @@ local function receive(dtime)
|
|||||||
function(result)
|
function(result)
|
||||||
if result.succeeded then
|
if result.succeeded then
|
||||||
local data = minetest.parse_json(result.data)
|
local data = minetest.parse_json(result.data)
|
||||||
core.log("action", "[MOD] yl_matterbridge : Posted " .. dump(data))
|
|
||||||
for _,v in ipairs(data) do
|
for _,v in ipairs(data) do
|
||||||
if v.username and v.text then
|
if v.username and v.text then
|
||||||
yl_matterbridge.publish_to_chat(v.username, v.text)
|
yl_matterbridge.publish_to_chat(v.username, v.text)
|
||||||
|
Loading…
Reference in New Issue
Block a user