\r
function handle_stanza(origin, stanza)\r
local node, host = jid_split(stanza.attr.to);\r
- local component = components[host];\r
+ 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\r
- if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource\r
+ if not component then component = components[host]; end
if component then\r
log("debug", "stanza being handled by component: "..host);\r
component(origin, stanza, hosts[host]);\r