From 8ac7dd536fbeb2a701e91491d14a3b6f0ffbdc99 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 24 Dec 2008 05:10:13 +0500 Subject: [PATCH] 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]); -- 2.30.2