From 134f86e8d5c414409631b25b8c6f0ee45fbd8631 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 3 Nov 2016 21:44:39 +1000 Subject: Initial update to OpenSim 0.8.2.1 source code. --- .../CoreModules/Avatar/Friends/HGFriendsModule.cs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index bf5c0bb..27b7376 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs @@ -183,6 +183,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends if (Util.ParseUniversalUserIdentifier(finfo.Friend, out id, out url, out first, out last, out tmp)) { IUserManagement uMan = m_Scenes[0].RequestModuleInterface(); + m_log.DebugFormat("[HGFRIENDS MODULE]: caching {0}", finfo.Friend); uMan.AddUser(id, url + ";" + first + " " + last); } } @@ -238,6 +239,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends fList.Add(s.Substring(0, 36)); } + // FIXME: also query the presence status of friends in other grids (like in HGStatusNotifier.Notify()) + PresenceInfo[] presence = PresenceService.GetAgents(fList.ToArray()); foreach (PresenceInfo pi in presence) { @@ -251,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends protected override void StatusNotify(List friendList, UUID userID, bool online) { -// m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID); + //m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID); // First, let's divide the friends on a per-domain basis Dictionary> friendsPerDomain = new Dictionary>(); @@ -293,7 +296,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends protected override bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) { - first = "Unknown"; last = "User"; + first = "Unknown"; last = "UserHGGAI"; if (base.GetAgentInfo(scopeID, fid, out agentID, out first, out last)) return true; @@ -349,7 +352,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends public override FriendInfo[] GetFriendsFromService(IClientAPI client) { -// m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name); + // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name); Boolean agentIsLocal = true; if (UserManagementModule != null) agentIsLocal = UserManagementModule.IsLocalGridUser(client.AgentId); @@ -362,13 +365,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends AgentCircuitData agentClientCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); if (agentClientCircuit != null) { - //[XXX] string agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit); - + // Note that this is calling a different interface than base; this one calls with a string param! finfos = FriendsService.GetFriends(client.AgentId.ToString()); m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, client.AgentId.ToString()); } -// m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name); + // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name); return finfos; } @@ -658,7 +660,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends FriendsService.Delete(friendUUI, agentID.ToString()); // notify the exfriend's service - Util.FireAndForget(delegate { Delete(exfriendID, agentID, friendUUI); }); + Util.FireAndForget( + delegate { Delete(exfriendID, agentID, friendUUI); }, null, "HGFriendsModule.DeleteFriendshipForeignFriend"); m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentID, friendUUI); return true; @@ -676,7 +679,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends FriendsService.Delete(agentUUI, exfriendID.ToString()); // notify the agent's service? - Util.FireAndForget(delegate { Delete(agentID, exfriendID, agentUUI); }); + Util.FireAndForget( + delegate { Delete(agentID, exfriendID, agentUUI); }, null, "HGFriendsModule.DeleteFriendshipLocalFriend"); m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentUUI, exfriendID); return true; -- cgit v1.1