Changeset

2020:24f54340a670

prosodyctl: Remove dependency on hostmanager, and friends
author Matthew Wild <mwild1@gmail.com>
date Mon, 19 Oct 2009 16:53:50 +0100
parents 2019:c712ea57b877
children 2021:43b7c0980d23
files prosodyctl
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Sun Oct 18 16:16:27 2009 +0100
+++ b/prosodyctl	Mon Oct 19 16:53:50 2009 +0100
@@ -32,7 +32,6 @@
 -- Required to be able to find packages installed with luarocks
 pcall(require, "luarocks.require")
 
-
 config = require "core.configmanager"
 
 do
@@ -107,10 +106,15 @@
 		["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"