plugins/mod_component.lua

changeset 3617
26c9ba8f309c
parent 3616
95ae7af2c82b
child 3618
321767e78029
--- 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");

mercurial