Diff

prosodyctl @ 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
parent 2706:c2dde8bda3fe
child 3014:169d096988e1
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);