From 31bd01ae390739c81f73ea88a9717a3c62107f69 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 4 Mar 2009 22:15:46 +0500 Subject: Allow global modules to hook stanza handlers --- core/modulemanager.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'core') diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 5afe3144..5bbff0ad 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -212,6 +212,7 @@ function handle_stanza(host, origin, stanza) 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); -- cgit v1.2.3