prosodyctl: Give each host an independant events object, because it seems to be the right thing to do

Wed, 05 May 2010 20:14:24 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 05 May 2010 20:14:24 +0100
changeset 3014
169d096988e1
parent 3013
518e3f6f9946
child 3015
aad8034ab389

prosodyctl: Give each host an independant events object, because it seems to be the right thing to do

prosodyctl file | annotate | diff | comparison | revisions
--- a/prosodyctl	Wed May 05 20:14:03 2010 +0100
+++ b/prosodyctl	Wed May 05 20:14:24 2010 +0100
@@ -120,12 +120,10 @@
 		["not-running"] = "Prosody is not running";
 		}, { __index = function (t,k) return "Error: "..(tostring(k):gsub("%-", " "):gsub("^.", string.upper)); end });
 
-local events = require "util.events".new();
-
 hosts = prosody.hosts;
 
 for hostname, config in pairs(config.getconfig()) do
-	hosts[hostname] = { events = events };
+	hosts[hostname] = { events = require "util.events".new() };
 end
 	
 require "core.modulemanager"

mercurial