Software /
code /
prosody-modules
Changeset
2447:366fadb5c6e5
mod_persisthosts: Fire an event to allow other modules a chance to write to the new config file
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 18 Jan 2017 01:52:50 +0100 |
parents | 2446:c563f4d64302 |
children | 2448:1f7f66272f73 |
files | mod_persisthosts/mod_persisthosts.lua |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_persisthosts/mod_persisthosts.lua Wed Jan 18 01:38:17 2017 +0100 +++ b/mod_persisthosts/mod_persisthosts.lua Wed Jan 18 01:52:50 2017 +0100 @@ -18,6 +18,7 @@ local fh, err = io.open(path, "w"); if fh then fh:write(("VirtualHost%q\n"):format(host)); + module:fire_event("host-persisted", { host = host, file = fh }); fh:close(); module:log("info", "Config file for host '%s' created", host); else