Changeset

3617:26c9ba8f309c

mod_component: Use module:get_option() instead of configmanager.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 12 Nov 2010 23:35:02 +0500
parents 3616:95ae7af2c82b
children 3618:321767e78029
files plugins/mod_component.lua
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_component.lua	Fri Nov 12 23:32:51 2010 +0500
+++ b/plugins/mod_component.lua	Fri Nov 12 23:35:02 2010 +0500
@@ -14,7 +14,6 @@
 
 local t_concat = table.concat;
 
-local config = require "core.configmanager";
 local sha1 = require "util.hashes".sha1;
 local st = require "util.stanza";
 
@@ -68,7 +67,7 @@
 		return true;
 	end
 	
-	local secret = config.get(session.host, "core", "component_secret");
+	local secret = module:get_option("component_secret");
 	if not secret then
 		(session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host);
 		session:close("not-authorized");