aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-01-04 21:18:35 +0000
committerMatthew Wild <mwild1@gmail.com>2011-01-04 21:18:35 +0000
commit99ec1ccf1ecd17d55d1298906e94b50a2ac56034 (patch)
treef4051527a3e3db61aa0f2397229dcdad63886b8e
parent18e42c9e081d3405b90abea5176b803da9d6077b (diff)
downloadprosody-99ec1ccf1ecd17d55d1298906e94b50a2ac56034.tar.gz
prosody-99ec1ccf1ecd17d55d1298906e94b50a2ac56034.zip
prosody, prosodyctl: Create prosody object as a local before exporting as a global
-rwxr-xr-xprosody4
-rwxr-xr-xprosodyctl4
2 files changed, 4 insertions, 4 deletions
diff --git a/prosody b/prosody
index 7c819214..b093e4fd 100755
--- a/prosody
+++ b/prosody
@@ -32,8 +32,8 @@ if CFG_DATADIR then
end
-- Global 'prosody' object
-prosody = { events = require "util.events".new(); };
-local prosody = prosody;
+local prosody = { events = require "util.events".new(); };
+_G.prosody = prosody;
-- Check dependencies
local dependencies = require "util.dependencies";
diff --git a/prosodyctl b/prosodyctl
index 9630a9b8..dae9268a 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -32,14 +32,14 @@ if CFG_DATADIR then
end
-- Global 'prosody' object
-prosody = {
+local prosody = {
hosts = {};
events = require "util.events".new();
platform = "posix";
lock_globals = function () end;
unlock_globals = function () end;
};
-local prosody = prosody;
+_G.prosody = prosody;
local dependencies = require "util.dependencies";
if not dependencies.check_dependencies() then