Changeset

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
parents 4729:da3c1d980c04
children 4731:84596fc32b31
files core/hostmanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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) };