Software /
code /
prosody
Comparison
core/modulemanager.lua @ 7303:439d00063620
modulemanager: Silence log message about attempts to load already loaded modules for shared modules
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 19 Mar 2016 16:35:43 +0100 |
parent | 7163:eadbf19d0de0 |
child | 7947:24170d74b00b |
comparison
equal
deleted
inserted
replaced
7301:995777582044 | 7303:439d00063620 |
---|---|
123 if not modulemap[host] then | 123 if not modulemap[host] then |
124 modulemap[host] = hosts[host].modules; | 124 modulemap[host] = hosts[host].modules; |
125 end | 125 end |
126 | 126 |
127 if modulemap[host][module_name] then | 127 if modulemap[host][module_name] then |
128 log("debug", "%s is already loaded for %s, so not loading again", module_name, host); | 128 if not modulemap["*"][module_name] then |
129 log("debug", "%s is already loaded for %s, so not loading again", module_name, host); | |
130 end | |
129 return nil, "module-already-loaded"; | 131 return nil, "module-already-loaded"; |
130 elseif modulemap["*"][module_name] then | 132 elseif modulemap["*"][module_name] then |
131 local mod = modulemap["*"][module_name]; | 133 local mod = modulemap["*"][module_name]; |
132 if module_has_method(mod, "add_host") then | 134 if module_has_method(mod, "add_host") then |
133 local _log = logger.init(host..":"..module_name); | 135 local _log = logger.init(host..":"..module_name); |