Software / code / prosody
Comparison
core/modulemanager.lua @ 876:fad020cead52
Allow global modules to hook stanza handlers
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Wed, 04 Mar 2009 22:15:46 +0500 |
| parent | 778:0d94b4903cc7 |
| child | 878:72a7eeaa9e58 |
comparison
equal
deleted
inserted
replaced
| 875:e73b6ef579c7 | 876:fad020cead52 |
|---|---|
| 210 log("debug", "Discarding %s from %s of type: %s", name, origin_type, stanza.attr.type); | 210 log("debug", "Discarding %s from %s of type: %s", name, origin_type, stanza.attr.type); |
| 211 return true; | 211 return true; |
| 212 end | 212 end |
| 213 end | 213 end |
| 214 local handlers = stanza_handlers:get(host, origin_type, name, xmlns); | 214 local handlers = stanza_handlers:get(host, origin_type, name, xmlns); |
| 215 if not handlers then handlers = stanza_handlers:get("*", origin_type, name, xmlns); end | |
| 215 if handlers then | 216 if handlers then |
| 216 log("debug", "Passing stanza to mod_%s", handler_info[handlers[1]].name); | 217 log("debug", "Passing stanza to mod_%s", handler_info[handlers[1]].name); |
| 217 (handlers[1])(origin, stanza); | 218 (handlers[1])(origin, stanza); |
| 218 return true; | 219 return true; |
| 219 else | 220 else |