From 0d65c3fef770ea2491514c981b73d1743ddf7b68 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 5 Jul 2009 16:21:58 +0500 Subject: sessionmanager: Replace raw session by an event data table for resource bind/unbind events, allowing extra data --- core/sessionmanager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua index 1b6aee17..91a8a22f 100644 --- a/core/sessionmanager.lua +++ b/core/sessionmanager.lua @@ -66,7 +66,7 @@ function destroy_session(session, err) -- Remove session/resource from user's session list if session.full_jid then - hosts[session.host].events.fire_event("resource-unbind", session); + hosts[session.host].events.fire_event("resource-unbind", {session=session, error=err}); hosts[session.host].sessions[session.username].sessions[session.resource] = nil; full_sessions[session.full_jid] = nil; @@ -152,7 +152,7 @@ function bind_resource(session, resource) session.roster = rm_load_roster(session.username, session.host); - hosts[session.host].events.fire_event("resource-bind", session); + hosts[session.host].events.fire_event("resource-bind", {session=session}); return true; end -- cgit v1.2.3