# HG changeset patch # User Waqas Hussain # Date 1236186946 -18000 # Node ID fad020cead523f4dcd37af962d4d82bc1ecf53e6 # Parent e73b6ef579c7ea536516d53c465b667ea77dcfd3 Allow global modules to hook stanza handlers diff -r e73b6ef579c7 -r fad020cead52 core/modulemanager.lua --- 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);