Software / code / prosody
Comparison
plugins/mod_component.lua @ 3674:4b7281c577b9
mod_component: Give stanza handlers a negative priority, to allow mod_iq to process them first.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Thu, 02 Dec 2010 16:15:50 +0500 |
| parent | 3618:321767e78029 |
| child | 4301:1484ac561b28 |
comparison
equal
deleted
inserted
replaced
| 3673:43b854062206 | 3674:4b7281c577b9 |
|---|---|
| 41 end | 41 end |
| 42 end | 42 end |
| 43 return true; | 43 return true; |
| 44 end | 44 end |
| 45 | 45 |
| 46 module:hook("iq/bare", handle_stanza); | 46 module:hook("iq/bare", handle_stanza, -1); |
| 47 module:hook("message/bare", handle_stanza); | 47 module:hook("message/bare", handle_stanza, -1); |
| 48 module:hook("presence/bare", handle_stanza); | 48 module:hook("presence/bare", handle_stanza, -1); |
| 49 module:hook("iq/full", handle_stanza); | 49 module:hook("iq/full", handle_stanza, -1); |
| 50 module:hook("message/full", handle_stanza); | 50 module:hook("message/full", handle_stanza, -1); |
| 51 module:hook("presence/full", handle_stanza); | 51 module:hook("presence/full", handle_stanza, -1); |
| 52 module:hook("iq/host", handle_stanza); | 52 module:hook("iq/host", handle_stanza, -1); |
| 53 module:hook("message/host", handle_stanza); | 53 module:hook("message/host", handle_stanza, -1); |
| 54 module:hook("presence/host", handle_stanza); | 54 module:hook("presence/host", handle_stanza, -1); |
| 55 | 55 |
| 56 --- Handle authentication attempts by components | 56 --- Handle authentication attempts by components |
| 57 function handle_component_auth(event) | 57 function handle_component_auth(event) |
| 58 local session, stanza = event.origin, event.stanza; | 58 local session, stanza = event.origin, event.stanza; |
| 59 | 59 |