modulemanager: Hide deprecation warning for modules loaded on '*' directly (e.g. prosodyctl mod_<command>) (thanks Zash)
--- a/core/modulemanager.lua Sun Apr 29 19:31:44 2012 +0100
+++ b/core/modulemanager.lua Sun Apr 29 19:36:11 2012 +0100
@@ -180,7 +180,9 @@
if api_instance.host == "*" then
if not api_instance.global then -- COMPAT w/pre-0.9
- log("warn", "mod_%s: Setting module.host = '*' deprecated, call module:set_global() instead", module_name);
+ if host ~= "*" then
+ log("warn", "mod_%s: Setting module.host = '*' deprecated, call module:set_global() instead", module_name);
+ end
api_instance:set_global();
end
modulemap[host][module_name] = nil;