prosodyctl: Remove dependency on hostmanager, and friends

Mon, 19 Oct 2009 16:53:50 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 19 Oct 2009 16:53:50 +0100
changeset 2020
24f54340a670
parent 2019
c712ea57b877
child 2021
43b7c0980d23

prosodyctl: Remove dependency on hostmanager, and friends

prosodyctl file | annotate | diff | comparison | revisions
--- 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"

mercurial