Mercurial > prosody-modules
view mod_s2s_reload_newcomponent/mod_s2s_reload_newcomponent.lua @ 1787:663e5d923ef0
mod_s2s_log_certs: Use new 0.10 API for wrapping event handlers in order to always print log message after all s2s cert checks
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 25 Aug 2015 16:58:39 +0200 |
parents | 7487f8b47662 |
children | fe5bb7b13a59 |
line wrap: on
line source
local modulemanager = require "core.modulemanager"; local config = require "core.configmanager"; module.host = "*"; local function reload_components() local defined_hosts = config.getconfig(); for host in pairs(defined_hosts) do if (not hosts[host] and host ~= "*") then module:log ("debug", "loading new component %s", host); modulemanager.load(host, configmanager.get(host, "core", "component_module")); end end; return; end module:hook("config-reloaded", reload_components);