Mercurial > prosody-hg
comparison util/startup.lua @ 8692:a55574754e5f
configmanager: Move firing of the 'config-reloaded' event into util.startup (fixes #1117)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 25 Mar 2018 17:02:00 +0200 |
| parents | 019b4b3dd5ad |
| children | 0499f3da0ec4 |
comparison
equal
deleted
inserted
replaced
| 8691:564e2c63e0d4 | 8692:a55574754e5f |
|---|---|
| 227 if level == "parser" then | 227 if level == "parser" then |
| 228 log("error", "There was an error parsing the configuration file: %s", tostring(err)); | 228 log("error", "There was an error parsing the configuration file: %s", tostring(err)); |
| 229 elseif level == "file" then | 229 elseif level == "file" then |
| 230 log("error", "Couldn't read the config file when trying to reload: %s", tostring(err)); | 230 log("error", "Couldn't read the config file when trying to reload: %s", tostring(err)); |
| 231 end | 231 end |
| 232 else | |
| 233 prosody.events.fire_event("config-reloaded", { | |
| 234 filename = prosody.config_file, | |
| 235 config = config.getconfig(), | |
| 236 }); | |
| 232 end | 237 end |
| 233 return ok, (err and tostring(level)..": "..tostring(err)) or nil; | 238 return ok, (err and tostring(level)..": "..tostring(err)) or nil; |
| 234 end | 239 end |
| 235 | 240 |
| 236 -- Function to reopen logfiles | 241 -- Function to reopen logfiles |
