From a76d2c46fbd6504748286fd5600755f4d18fe1d3 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 29 Apr 2012 19:36:11 +0100 Subject: modulemanager: Hide deprecation warning for modules loaded on '*' directly (e.g. prosodyctl mod_) (thanks Zash) --- core/modulemanager.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 90116166..461bff5c 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -180,7 +180,9 @@ local function do_load_module(host, module_name) 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; -- cgit v1.2.3