Software /
code /
prosody
Diff
core/modulemanager.lua @ 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 |
parent | 4776:dbe9d75c0452 |
child | 4804:607414b26c8c |
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;