end
end
--- Global 'prosody' object
-prosody = {
- hosts = {},
- events = require "util.events".new(),
- platform = "posix"
-};
-local prosody = prosody;
-
config = require "core.configmanager"
do
os.exit(1);
end
+prosody = { hosts = {}, events = events, platform = "posix" };
+
local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
require "util.datamanager".set_data_path(data_path);
["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;
for hostname, config in pairs(config.getconfig()) do
- hosts[hostname] = { events = prosody.events };
+ hosts[hostname] = { events = events };
end
require "core.modulemanager"