Changeset

2415:eb383f58624b

mod_saslauth: Use module:get_option()
author Paul Aurich <paul@darkrain42.org>
date Sun, 03 Jan 2010 09:51:01 -0800
parents 2414:1596e0c0019b
children 2417:70f65a48f05e
files plugins/mod_saslauth.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua	Sat Jan 02 20:03:24 2010 -0800
+++ b/plugins/mod_saslauth.lua	Sun Jan 03 09:51:01 2010 -0800
@@ -25,8 +25,8 @@
 local md5 = require "util.hashes".md5;
 local config = require "core.configmanager";
 
-local secure_auth_only = config.get(module:get_host(), "core", "c2s_require_encryption") or config.get(module:get_host(), "core", "require_encryption");
-local sasl_backend = config.get(module:get_host(), "core", "sasl_backend") or "builtin";
+local secure_auth_only = module:get_option("c2s_require_encryption") or module:get_option("require_encryption");
+local sasl_backend = module:get_option("sasl_backend") or "builtin";
 
 local log = module._log;
 
@@ -38,7 +38,7 @@
 if sasl_backend == "cyrus" then
 	cyrus_new = require "util.sasl_cyrus".new;
 	new_sasl = function(realm)
-			return cyrus_new(realm, config.get(module:get_host(), "core", "cyrus_service_name") or "xmpp")
+			return cyrus_new(realm, module:get_option("cyrus_service_name") or "xmpp")
 		end
 else
 	if sasl_backend ~= "backend" then log("warning", "Unknown SASL backend %s", sasl_backend) end;