Changeset

3013:518e3f6f9946

prosodyctl: Relocate global prosody object creation (see fff153f7f4de)
author Matthew Wild <mwild1@gmail.com>
date Wed, 05 May 2010 20:14:03 +0100
parents 3012:6d86e26f0923
children 3014:169d096988e1
files prosodyctl
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Wed May 05 19:01:14 2010 +0100
+++ b/prosodyctl	Wed May 05 20:14:03 2010 +0100
@@ -29,6 +29,14 @@
 	end
 end
 
+-- Global 'prosody' object
+prosody = {
+	hosts = {},
+	events = require "util.events".new(),
+	platform = "posix"
+};
+local prosody = prosody;
+
 config = require "core.configmanager"
 
 do
@@ -63,8 +71,6 @@
 	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);