Automated merge with http://waqas.ath.cx:8000/
authorMatthew Wild <mwild1@gmail.com>
Wed, 24 Dec 2008 23:19:48 +0000 (23:19 +0000)
committerMatthew Wild <mwild1@gmail.com>
Wed, 24 Dec 2008 23:19:48 +0000 (23:19 +0000)
core/componentmanager.lua

index a63cfd7abee186cb8513c9ccd93432e9efe89735..72cdda142cc0d54f9138b63658a68d399f29ea35 100644 (file)
@@ -31,9 +31,10 @@ module "componentmanager"
 \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