Software / code / prosody
Diff
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 |
line wrap: on
line diff
--- a/core/modulemanager.lua Wed Mar 04 22:12:52 2009 +0500 +++ b/core/modulemanager.lua Wed Mar 04 22:15:46 2009 +0500 @@ -212,6 +212,7 @@ end end local handlers = stanza_handlers:get(host, origin_type, name, xmlns); + if not handlers then handlers = stanza_handlers:get("*", origin_type, name, xmlns); end if handlers then log("debug", "Passing stanza to mod_%s", handler_info[handlers[1]].name); (handlers[1])(origin, stanza);