From cf934a730664bde4d017043b884730213e17fdd1 Mon Sep 17 00:00:00 2001
From: joenas <jon@jonnev.se>
Date: Wed, 21 Jun 2017 22:05:32 +0200
Subject: [PATCH] Added note about mod security. Also: Fixed matrix connection

---
 README.md | 4 ++--
 init.lua  | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 2b3b20c..e41c048 100644
--- a/README.md
+++ b/README.md
@@ -36,10 +36,10 @@ export MATRIX_API_HTTP_CLIENT=luasocket
 
 You might need to prepend `sudo` to first and second commands
 
-You also need to add Matrix to your trusted mods if you haven't disabled mod security.
+For the moment you need to disabled mod security for lua-matrix to work. This will hopefully change.
 
 ```
-secure.trusted_mods = matrix
+secure.enable_security = false
 ```
 
 [wiki]: https://wiki.minetest.net/Installing_mods
diff --git a/init.lua b/init.lua
index 48af83c..5340f02 100644
--- a/init.lua
+++ b/init.lua
@@ -8,8 +8,7 @@ local ie, req_ie = _G, minetest.request_insecure_environment
 if req_ie then ie = req_ie() end
 if not ie then
   error("The Matrix mod requires access to insecure functions in order "..
-    "to work.  Please add the matrix mod to your secure.trusted_mods "..
-    "setting or disable the matrix mod.")
+    "to work. Please disable mod security. This will hopefully change.")
 end
 
 ie.package.path =
@@ -30,7 +29,7 @@ local function eprintf(fmt, ...)
   minetest.log("info", fmt:format(...))
 end
 
-local client = require("matrix").client("https://"..matrix.config.server..":"..matrix.config.port)
+local client = require("matrix").client(matrix.config.server..":"..matrix.config.port)
 
 local start_ts = os.time() * 1000
 
-- 
GitLab