From 67e111826e24a9ac3a2290eedcf7f1060aa3c33d Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 19 Oct 2009 16:53:50 +0100 Subject: prosodyctl: Remove dependency on hostmanager, and friends --- prosodyctl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/prosodyctl b/prosodyctl index 358ec9ea..f7883322 100755 --- a/prosodyctl +++ b/prosodyctl @@ -32,7 +32,6 @@ end -- Required to be able to find packages installed with luarocks pcall(require, "luarocks.require") - config = require "core.configmanager" do @@ -107,10 +106,15 @@ local error_messages = setmetatable({ ["not-running"] = "Prosody is not running"; }, { __index = function (t,k) return "Error: "..(tostring(k):gsub("%-", " "):gsub("^.", string.upper)); end }); +local events = require "util.events".new(); + hosts = {}; +prosody = { hosts = hosts, events = events }; -require "core.hostmanager" -require "core.eventmanager".fire_event("server-starting"); +for hostname, config in pairs(config.getconfig()) do + hosts[hostname] = { events = events }; +end + require "core.modulemanager" require "util.prosodyctl" -- cgit v1.2.3