Changeset

4801:83cedf648b46

modulemanager: Hide deprecation warning for modules loaded on '*' directly (e.g. prosodyctl mod_<command>) (thanks Zash)
author Matthew Wild <mwild1@gmail.com>
date Sun, 29 Apr 2012 19:36:11 +0100
parents 4800:7ce502f21270
children 4802:916c35d6105f
files core/modulemanager.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;