From 483f3cd6d6eb2b8591f0cff404b78e6f88cf4987 Mon Sep 17 00:00:00 2001 From: Waqas Hussain <waqas20@gmail.com> Date: Wed, 24 Dec 2008 05:10:13 +0500 Subject: Changed order of checking for component hosts to check the full and bare JIDs before the hostname --- core/componentmanager.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/componentmanager.lua b/core/componentmanager.lua index a63cfd7a..72cdda14 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -31,9 +31,10 @@ module "componentmanager" 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]); -- cgit v1.2.3