aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_tls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_tls.lua')
-rw-r--r--plugins/mod_tls.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua
index 8926edfc..10455559 100644
--- a/plugins/mod_tls.lua
+++ b/plugins/mod_tls.lua
@@ -6,14 +6,11 @@
-- COPYING file in the source package for more information.
--
-
-
local st = require "util.stanza";
local xmlns_starttls ='urn:ietf:params:xml:ns:xmpp-tls';
-local config = require "core.configmanager";
-local secure_auth_only = config.get("*", "core", "require_encryption");
+local secure_auth_only = module:get_option("require_encryption");
module:add_handler("c2s_unauthed", "starttls", xmlns_starttls,
function (session, stanza)
@@ -31,7 +28,7 @@ module:add_handler("c2s_unauthed", "starttls", xmlns_starttls,
local starttls_attr = { xmlns = xmlns_starttls };
module:add_event_hook("stream-features",
- function (session, features)
+ function (session, features)
if session.conn.starttls then
features:tag("starttls", starttls_attr);
if secure_auth_only then