From 427f0cc3313c819729f198320d002f55c0f65be8 Mon Sep 17 00:00:00 2001 From: - <-> Date: Fri, 28 Jan 2022 19:53:03 -0800 Subject: [PATCH] Removed unused vars. --- init.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 511fce2..819cd23 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,4 @@ -print("Matrix bridge loaded.") - local modpath = minetest.get_modpath(minetest.get_current_modname()) dofile(modpath.."/config.lua") @@ -21,7 +19,6 @@ local MatrixChat = { userid = nil, token = nil, since = nil, - lastok_since = nil, eventid = nil } @@ -92,7 +89,6 @@ function MatrixChat:sync(timeout) local response = minetest.parse_json(res.data) if response ~= nil then MatrixChat:minechat(response) - self.lastok_since = self.since self.since = response.next_batch end end @@ -159,11 +155,10 @@ end -- print a sync url to console to test matrix connection in other applications function MatrixChat:get_access_url() local params = {} - -- no filter param if self.since ~= nil then - params[1] = "since=" .. self.since + table.insert(params, "since=" .. self.since) end - params[2] = "access_token=" .. self.token + table.insert(params, "access_token=" .. self.token) local u = self.server .. "/_matrix/client/r0/sync?" .. table.concat(params, "&") print(u) end