Mercurial > prosody-hg
diff core/modulemanager.lua @ 4638:352cd61e2682
modulemanager: Allow loading a module onto "*" (part-fixes #228)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 21 Apr 2012 20:00:30 +0100 |
| parents | 17785dbd9d58 |
| children | 98a29138dec8 |
line wrap: on
line diff
--- a/core/modulemanager.lua Sat Apr 21 16:27:42 2012 +0100 +++ b/core/modulemanager.lua Sat Apr 21 20:00:30 2012 +0100 @@ -117,13 +117,15 @@ local function do_load_module(host, module_name) if not (host and module_name) then return nil, "insufficient-parameters"; - elseif not hosts[host] then + elseif not hosts[host] and host ~= "*"then return nil, "unknown-host"; end if not modulemap[host] then modulemap[host] = {}; - hosts[host].modules = modulemap[host]; + if host ~= "*" then + hosts[host].modules = modulemap[host]; + end end if modulemap[host][module_name] then
