prosodyctl
changeset 3014 169d096988e1
parent 3013 518e3f6f9946
child 3015 aad8034ab389
equal deleted inserted replaced
3013:518e3f6f9946 3014:169d096988e1
   118 		["no-pidfile"] = "There is no 'pidfile' option in the configuration file, see http://prosody.im/doc/prosodyctl#pidfile for help";
   118 		["no-pidfile"] = "There is no 'pidfile' option in the configuration file, see http://prosody.im/doc/prosodyctl#pidfile for help";
   119 		["no-such-method"] = "This module has no commands";
   119 		["no-such-method"] = "This module has no commands";
   120 		["not-running"] = "Prosody is not running";
   120 		["not-running"] = "Prosody is not running";
   121 		}, { __index = function (t,k) return "Error: "..(tostring(k):gsub("%-", " "):gsub("^.", string.upper)); end });
   121 		}, { __index = function (t,k) return "Error: "..(tostring(k):gsub("%-", " "):gsub("^.", string.upper)); end });
   122 
   122 
   123 local events = require "util.events".new();
       
   124 
       
   125 hosts = prosody.hosts;
   123 hosts = prosody.hosts;
   126 
   124 
   127 for hostname, config in pairs(config.getconfig()) do
   125 for hostname, config in pairs(config.getconfig()) do
   128 	hosts[hostname] = { events = events };
   126 	hosts[hostname] = { events = require "util.events".new() };
   129 end
   127 end
   130 	
   128 	
   131 require "core.modulemanager"
   129 require "core.modulemanager"
   132 
   130 
   133 require "util.prosodyctl"
   131 require "util.prosodyctl"