Diff

core/hostmanager.lua @ 4730:2587e249927f

hostmanager: Convert host-deactivating event parameters to a table
author Matthew Wild <mwild1@gmail.com>
date Fri, 27 Apr 2012 22:31:53 +0100
parent 4508:b9e0bd59d817
child 4731:84596fc32b31
line wrap: on
line diff
--- a/core/hostmanager.lua	Fri Apr 27 22:18:20 2012 +0100
+++ b/core/hostmanager.lua	Fri Apr 27 22:31:53 2012 +0100
@@ -102,7 +102,7 @@
 	local host_session = hosts[host];
 	if not host_session then return nil, "The host "..tostring(host).." is not activated"; end
 	log("info", "Deactivating host: %s", host);
-	prosody_events.fire_event("host-deactivating", host, host_session);
+	prosody_events.fire_event("host-deactivating", { host = host, host_session = host_session, reason = reason });
 	
 	if type(reason) ~= "table" then
 		reason = { condition = "host-gone", text = tostring(reason or "This server has stopped serving "..host) };