prosodyctl

changeset 2020
24f54340a670
parent 1580
5be6dc582df3
child 2065
c384ae8ee17a
equal deleted inserted replaced
2019:c712ea57b877 2020:24f54340a670
29 end 29 end
30 end 30 end
31 31
32 -- Required to be able to find packages installed with luarocks 32 -- Required to be able to find packages installed with luarocks
33 pcall(require, "luarocks.require") 33 pcall(require, "luarocks.require")
34
35 34
36 config = require "core.configmanager" 35 config = require "core.configmanager"
37 36
38 do 37 do
39 -- TODO: Check for other formats when we add support for them 38 -- TODO: Check for other formats when we add support for them
105 ["no-pidfile"] = "There is no pidfile option in the configuration file, see http://prosody.im/doc/prosodyctl#pidfile for help"; 104 ["no-pidfile"] = "There is no pidfile option in the configuration file, see http://prosody.im/doc/prosodyctl#pidfile for help";
106 ["no-such-method"] = "This module has no commands"; 105 ["no-such-method"] = "This module has no commands";
107 ["not-running"] = "Prosody is not running"; 106 ["not-running"] = "Prosody is not running";
108 }, { __index = function (t,k) return "Error: "..(tostring(k):gsub("%-", " "):gsub("^.", string.upper)); end }); 107 }, { __index = function (t,k) return "Error: "..(tostring(k):gsub("%-", " "):gsub("^.", string.upper)); end });
109 108
109 local events = require "util.events".new();
110
110 hosts = {}; 111 hosts = {};
111 112 prosody = { hosts = hosts, events = events };
112 require "core.hostmanager" 113
113 require "core.eventmanager".fire_event("server-starting"); 114 for hostname, config in pairs(config.getconfig()) do
115 hosts[hostname] = { events = events };
116 end
117
114 require "core.modulemanager" 118 require "core.modulemanager"
115 119
116 require "util.prosodyctl" 120 require "util.prosodyctl"
117 require "socket" 121 require "socket"
118 ----------------------- 122 -----------------------

mercurial