diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-04-30 03:05:56 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-04-30 03:05:56 +0100 |
commit | 0188e331a5f9e8cd99c9872e9580f5b7811a5ccc (patch) | |
tree | 169a549af80682e0effdff00a5c0414ff734b300 /core/modulemanager.lua | |
parent | 5553cf3c48dbcbdc66fa734ce9371793d42d48bc (diff) | |
parent | a1a1fd2213c069994ddbb9b03e8ae39281deb6d5 (diff) | |
download | prosody-0188e331a5f9e8cd99c9872e9580f5b7811a5ccc.tar.gz prosody-0188e331a5f9e8cd99c9872e9580f5b7811a5ccc.zip |
Merge with 0.4
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r-- | core/modulemanager.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index a1d3bef3..cc48c2f6 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -123,6 +123,10 @@ function load(host, module_name, config) -- Use modified host, if the module set one modulemap[api_instance.host][module_name] = pluginenv; + if api_instance.host == "*" and host ~= "*" then + api_instance:set_global(); + end + return true; end @@ -260,6 +264,10 @@ end function api:set_global() self.host = "*"; + -- Update the logger + local _log = logger.init("mod_"..self.name); + self.log = function (self, ...) return _log(...); end; + self._log = _log; end local function _add_handler(module, origin_type, tag, xmlns, handler) |