From 3307db5d4aedec5cc31541e9a28a95abdd4999d0 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 7 Jun 2011 19:36:04 -0700 Subject: This hopefully fixes all issues with online/offline notifications across grids. http://opensimulator.org/mantis/view.php?id=5528 --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 2 +- OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index f82716d..daee4ca 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -830,10 +830,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends public bool LocalStatusNotification(UUID userID, UUID friendID, bool online) { + m_log.DebugFormat("[FRIENDS]: Local Status Notify {0} that user {1} is {2}", friendID, userID, online); IClientAPI friendClient = LocateClientObject(friendID); if (friendClient != null) { - //m_log.DebugFormat("[FRIENDS]: Local Status Notify {0} that user {1} is {2}", friendID, userID, online); // the friend in this sim as root agent if (online) friendClient.SendAgentOnline(new UUID[] { userID }); diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index ddf9289..b9d6719 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs @@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends /// friend whose status changed /// status /// - public bool StatusNotify(UUID userID, UUID friendID, bool online) + public bool StatusNotify(UUID friendID, UUID userID, bool online) { return LocalStatusNotification(friendID, userID, online); } @@ -279,7 +279,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends foreach (FriendInfo f in kvp.Value) ids.Add(f.Friend); UserAgentServiceConnector uConn = new UserAgentServiceConnector(kvp.Key); - uConn.StatusNotification(ids, userID, online); + List friendsOnline = uConn.StatusNotification(ids, userID, online); + // need to debug this here + if (online) + { + IClientAPI client = LocateClientObject(userID); + if (client != null) + client.SendAgentOnline(friendsOnline.ToArray()); + } } } } -- cgit v1.1