diff --git a/init.lua b/init.lua index 697ab73..7c00f24 100644 --- a/init.lua +++ b/init.lua @@ -42,7 +42,7 @@ function ssb_send(player, key, message) if err then return (string.format("error happened: %s", err)) else - minetest.log(json.encode(ret)) + -- minetest.log(json.encode(ret)) local v = { id = ret.key, sequence = ret.value.sequence + 1, @@ -69,7 +69,7 @@ function reap() if ret ~= nil then if c.id == ret.value.previous and c.rcpt == ret.value.author then table.remove(v, i) -- end conversation - local text = ssb:private():unbox(ret.value.content) + local text = ssb:private():unbox(ret.value.content).text local author = "ssb: " .. string.sub(ret.value.author, 1, 7) .. "..." minetest.chat_send_player(p, author .. " replied: " .. text) end diff --git a/ssb.lua b/ssb.lua index d0fbc98..0339aba 100644 --- a/ssb.lua +++ b/ssb.lua @@ -105,14 +105,13 @@ function rpc_source(conn, meth, mtype, param) return ret, err end - minetest.log(ret) do_goodbye(conn) return ret, err end function rpc_sync(conn, meth, mtype, param) - return rpc_source(conn, meth, mtype, param) + return rpc_source(conn, meth, "async", param) end function rpc_async(conn, meth, mtype, param)