aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/componentmanager.lua5
1 files 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]);