Software /
code /
prosody
Comparison
prosodyctl @ 3998:009d1ad84b49
prosody, prosodyctl: Create prosody object as a local before exporting as a global
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 04 Jan 2011 21:18:35 +0000 |
parent | 3904:f93163081b3c |
child | 3999:58c0de7c6da0 |
comparison
equal
deleted
inserted
replaced
3997:678e0688c18c | 3998:009d1ad84b49 |
---|---|
30 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME")); | 30 CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME")); |
31 end | 31 end |
32 end | 32 end |
33 | 33 |
34 -- Global 'prosody' object | 34 -- Global 'prosody' object |
35 prosody = { | 35 local prosody = { |
36 hosts = {}; | 36 hosts = {}; |
37 events = require "util.events".new(); | 37 events = require "util.events".new(); |
38 platform = "posix"; | 38 platform = "posix"; |
39 lock_globals = function () end; | 39 lock_globals = function () end; |
40 unlock_globals = function () end; | 40 unlock_globals = function () end; |
41 }; | 41 }; |
42 local prosody = prosody; | 42 _G.prosody = prosody; |
43 | 43 |
44 local dependencies = require "util.dependencies"; | 44 local dependencies = require "util.dependencies"; |
45 if not dependencies.check_dependencies() then | 45 if not dependencies.check_dependencies() then |
46 os.exit(1); | 46 os.exit(1); |
47 end | 47 end |