From d18374c137186bea7b8675aa357cc492a1c95fe1 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 16 May 2009 18:23:54 +0100 Subject: componentmanager: Don't error on stanzas to bare component JID --- core/componentmanager.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/componentmanager.lua') diff --git a/core/componentmanager.lua b/core/componentmanager.lua index d2a8d9f6..2053bff4 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -67,8 +67,10 @@ eventmanager.add_event_hook("server-starting", load_enabled_components); function handle_stanza(origin, stanza) local node, host = jid_split(stanza.attr.to); local component = nil; - if not component then component = components[node.."@"..host]; end -- hack to allow hooking node@server - if not component then component = components[host]; end + if host then + if node then component = components[node.."@"..host]; end -- hack to allow hooking node@server + if not component then component = components[host]; end + end if component then log("debug", "%s stanza being handled by component: %s", stanza.name, host); component(origin, stanza, hosts[host]); -- cgit v1.2.3