aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl12
1 files changed, 8 insertions, 4 deletions
diff --git a/prosodyctl b/prosodyctl
index 358ec9ea..522ebde9 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
@@ -102,15 +101,20 @@ local error_messages = setmetatable({
["no-password"] = "No password was supplied";
["no-such-user"] = "The given user does not exist on the server";
["unable-to-save-data"] = "Unable to store, perhaps you don't have permission?";
- ["no-pidfile"] = "There is no pidfile option in the configuration file, see http://prosody.im/doc/prosodyctl#pidfile for help";
+ ["no-pidfile"] = "There is no 'pidfile' option in the configuration file, see http://prosody.im/doc/prosodyctl#pidfile for help";
["no-such-method"] = "This module has no commands";
["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"