Software /
code /
prosody
Comparison
prosodyctl @ 3014:169d096988e1
prosodyctl: Give each host an independant events object, because it seems to be the right thing to do
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 05 May 2010 20:14:24 +0100 |
parent | 3013:518e3f6f9946 |
child | 3015:aad8034ab389 |
comparison
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" |