modulemanager: Hide deprecation warning for modules loaded on '*' directly (e.g. prosodyctl mod_<command>) (thanks Zash)
authorMatthew Wild <mwild1@gmail.com>
Sun, 29 Apr 2012 19:36:11 +0100
changeset 4801 83cedf648b46
parent 4800 7ce502f21270
child 4802 916c35d6105f
modulemanager: Hide deprecation warning for modules loaded on '*' directly (e.g. prosodyctl mod_<command>) (thanks Zash)
core/modulemanager.lua
--- 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;