Software /
code /
prosody
Changeset
3384:b7600dd7cd42
configmanager: Remove dependency on eventmanager, and global 'prosody' object
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 17 Jul 2010 14:50:16 +0100 |
parents | 3383:c7acddf80583 |
children | 3385:192ffdaef491 |
files | core/configmanager.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/core/configmanager.lua Fri Jul 16 22:47:26 2010 +0100 +++ b/core/configmanager.lua Sat Jul 17 14:50:16 2010 +0100 @@ -13,7 +13,7 @@ setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type, pairs, table, string.format; -local eventmanager = require "core.eventmanager"; +local fire_event = prosody and prosody.events.fire_event or function () end; module "configmanager" @@ -73,7 +73,7 @@ local ok, err = parsers[format].load(f:read("*a"), filename); f:close(); if ok then - eventmanager.fire_event("config-reloaded", { filename = filename, format = format }); + fire_event("config-reloaded", { filename = filename, format = format }); end return ok, "parser", err; end