Changeset

638:1915c64c9436

Changed order of checking for component hosts to check the full and bare JIDs before the hostname
author Waqas Hussain <waqas20@gmail.com>
date Wed, 24 Dec 2008 05:10:13 +0500
parents 631:6957fe7b0313
children 639:38cb21431257 640:068130563311
files core/componentmanager.lua
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/core/componentmanager.lua	Fri Dec 19 01:57:13 2008 +0500
+++ b/core/componentmanager.lua	Wed Dec 24 05:10:13 2008 +0500
@@ -31,9 +31,10 @@
 
 function handle_stanza(origin, stanza)
 	local node, host = jid_split(stanza.attr.to);
-	local component = components[host];
+	local component = nil;
+	if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource
 	if not component then component = components[node.."@"..host]; end -- hack to allow hooking node@server
-	if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource
+	if not component then component = components[host]; end
 	if component then
 		log("debug", "stanza being handled by component: "..host);
 		component(origin, stanza, hosts[host]);