137 to_type = '/bare'; |
137 to_type = '/bare'; |
138 end |
138 end |
139 end |
139 end |
140 |
140 |
141 local event_data = {origin=origin, stanza=stanza}; |
141 local event_data = {origin=origin, stanza=stanza}; |
142 if origin.full_jid then -- c2s connection |
142 if origin.full_jid == stanza.attr.from then -- c2s connection |
143 if hosts[origin.host].events.fire_event('pre-'..stanza.name..to_type, event_data) then return; end -- do preprocessing |
143 if hosts[origin.host].events.fire_event('pre-'..stanza.name..to_type, event_data) then return; end -- do preprocessing |
144 end |
144 end |
145 local h = hosts[to_bare] or hosts[host or origin.host]; |
145 local h = hosts[to_bare] or hosts[host or origin.host]; |
146 if h then |
146 if h then |
147 if h.events.fire_event(stanza.name..to_type, event_data) then return; end -- do processing |
147 if h.events.fire_event(stanza.name..to_type, event_data) then return; end -- do processing |