# HG changeset patch # User Matthew Wild # Date 1294175915 0 # Node ID 902f2ac67483a18df2f8f3421887ccec0029e429 # Parent 925a27f15a6054576c741c9456708054e8ab9d75 prosody, prosodyctl: Create prosody object as a local before exporting as a global diff -r 925a27f15a60 -r 902f2ac67483 prosody --- a/prosody Tue Jan 04 17:21:58 2011 +0000 +++ b/prosody Tue Jan 04 21:18:35 2011 +0000 @@ -32,8 +32,8 @@ 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 -r 925a27f15a60 -r 902f2ac67483 prosodyctl --- a/prosodyctl Tue Jan 04 17:21:58 2011 +0000 +++ b/prosodyctl Tue Jan 04 21:18:35 2011 +0000 @@ -32,14 +32,14 @@ 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