Mercurial > prosody-modules
comparison mod_reload_modules/mod_reload_modules.lua @ 4954:e8a487c42b36
merge upstream
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 28 May 2022 16:43:04 +0200 |
parents | cc14bfec209b |
children |
comparison
equal
deleted
inserted
replaced
4939:7d6ae8bb95dc | 4954:e8a487c42b36 |
---|---|
6 if not modules then | 6 if not modules then |
7 module:log("warn", "No modules listed in the config to reload - set reload_modules to a list"); | 7 module:log("warn", "No modules listed in the config to reload - set reload_modules to a list"); |
8 return; | 8 return; |
9 end | 9 end |
10 local configured_modules = module:get_option_inherited_set("modules_enabled", {}); | 10 local configured_modules = module:get_option_inherited_set("modules_enabled", {}); |
11 local component_module = module:get_option_string("component_module"); | |
12 if component_module then | |
13 -- Ensure awareness of the component module so that it is not unloaded | |
14 configured_modules:add(component_module); | |
15 end | |
16 | |
11 -- ignore removed hosts | 17 -- ignore removed hosts |
12 if not prosody.hosts[module.host] then | 18 if not prosody.hosts[module.host] then |
13 module:log("warn", "Ignoring host %s: host was removed...", module.host); | 19 module:log("warn", "Ignoring host %s: host was removed...", module.host); |
14 return; | 20 return; |
15 end | 21 end |