From bab68f4fb27eceb876d525f068933fbfa995ff98 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 17 Jul 2010 14:50:16 +0100 Subject: configmanager: Remove dependency on eventmanager, and global 'prosody' object --- core/configmanager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/configmanager.lua b/core/configmanager.lua index 9b03e1c7..6b181443 100644 --- a/core/configmanager.lua +++ b/core/configmanager.lua @@ -13,7 +13,7 @@ local setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type, p 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 @@ function load(filename, format) 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 -- cgit v1.2.3