Comparison

core/stanza_router.lua @ 3586:78ed7ad330ab

componentmanager, stanza_router: Get rid of componentmanager.handle_stanza().
author Waqas Hussain <waqas20@gmail.com>
date Wed, 10 Nov 2010 02:51:36 +0500
parent 3539:8bbd965267b2
child 4130:c3508071af47
comparison
equal deleted inserted replaced
3585:c8ce9923c315 3586:78ed7ad330ab
10 10
11 local hosts = _G.prosody.hosts; 11 local hosts = _G.prosody.hosts;
12 local tostring = tostring; 12 local tostring = tostring;
13 local st = require "util.stanza"; 13 local st = require "util.stanza";
14 local send_s2s = require "core.s2smanager".send_to_host; 14 local send_s2s = require "core.s2smanager".send_to_host;
15 local component_handle_stanza = require "core.componentmanager".handle_stanza;
16 local jid_split = require "util.jid".split; 15 local jid_split = require "util.jid".split;
17 local jid_prepped_split = require "util.jid".prepped_split; 16 local jid_prepped_split = require "util.jid".prepped_split;
18 17
19 local full_sessions = _G.prosody.full_sessions; 18 local full_sessions = _G.prosody.full_sessions;
20 local bare_sessions = _G.prosody.bare_sessions; 19 local bare_sessions = _G.prosody.bare_sessions;
170 end 169 end
171 local h = hosts[to_bare] or hosts[host or origin.host]; 170 local h = hosts[to_bare] or hosts[host or origin.host];
172 if h then 171 if h then
173 if h.events.fire_event(stanza.name..to_type, event_data) then return; end -- do processing 172 if h.events.fire_event(stanza.name..to_type, event_data) then return; end -- do processing
174 if to_self and h.events.fire_event(stanza.name..'/self', event_data) then return; end -- do processing 173 if to_self and h.events.fire_event(stanza.name..'/self', event_data) then return; end -- do processing
175
176 if h.type == "component" then
177 component_handle_stanza(origin, stanza);
178 return;
179 end
180 handle_unhandled_stanza(h.host, origin, stanza); 174 handle_unhandled_stanza(h.host, origin, stanza);
181 else 175 else
182 core_route_stanza(origin, stanza); 176 core_route_stanza(origin, stanza);
183 end 177 end
184 end 178 end