# HG changeset patch # User Waqas Hussain # Date 1246792918 -18000 # Node ID da11f2652ae9bcebfe9f47da6289855956492bfc # Parent e0411d6c9bae86e7ef2da7dd3917b5a058a4c73d sessionmanager: Replace raw session by an event data table for resource bind/unbind events, allowing extra data diff -r e0411d6c9bae -r da11f2652ae9 core/sessionmanager.lua --- a/core/sessionmanager.lua Sun Jul 05 12:43:25 2009 +0500 +++ b/core/sessionmanager.lua Sun Jul 05 16:21:58 2009 +0500 @@ -66,7 +66,7 @@ -- 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 @@ 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