Diff

core/sessionmanager.lua @ 1478:da11f2652ae9

sessionmanager: Replace raw session by an event data table for resource bind/unbind events, allowing extra data
author Waqas Hussain <waqas20@gmail.com>
date Sun, 05 Jul 2009 16:21:58 +0500
parent 1471:8b3753b080fc
child 1479:eef17ebe3ca1
line wrap: on
line diff
--- 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