Comparison

core/stanza_router.lua @ 1230:53555f58586f

stanza_router: Fix syntax errors
author Matthew Wild <mwild1@gmail.com>
date Fri, 29 May 2009 22:11:44 +0100
parent 1228:853d3d76ba94
child 1244:3df7417225fe
comparison
equal deleted inserted replaced
1229:331a68645f67 1230:53555f58586f
139 end 139 end
140 end 140 end
141 141
142 local event_data = {origin=origin, stanza=stanza}; 142 local event_data = {origin=origin, stanza=stanza};
143 if origin.full_jid then -- c2s connection 143 if origin.full_jid then -- c2s connection
144 if hosts[origin.host].events.fire_event('pre-'..stanza.name..to_type, event_data); then return; end -- do preprocessing 144 if hosts[origin.host].events.fire_event('pre-'..stanza.name..to_type, event_data) then return; end -- do preprocessing
145 end 145 end
146 local h = hosts[to_bare] or hosts[host or origin.host]; 146 local h = hosts[to_bare] or hosts[host or origin.host];
147 if h then 147 if h then
148 if h.type == "component" then 148 if h.type == "component" then
149 component_handle_stanza(origin, stanza); 149 component_handle_stanza(origin, stanza);
150 return; 150 return;
151 else 151 else
152 if h.events.fire_event(stanza.name..to_type, event_data); then return; end -- do processing 152 if h.events.fire_event(stanza.name..to_type, event_data) then return; end -- do processing
153 end 153 end
154 else -- non-local recipient 154 else -- non-local recipient
155 core_route_stanza(origin, stanza); 155 core_route_stanza(origin, stanza);
156 return; 156 return;
157 end 157 end