diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | 20 |
1 files changed, 12 insertions, 8 deletions
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 | |||
183 | if (Util.ParseUniversalUserIdentifier(finfo.Friend, out id, out url, out first, out last, out tmp)) | 183 | if (Util.ParseUniversalUserIdentifier(finfo.Friend, out id, out url, out first, out last, out tmp)) |
184 | { | 184 | { |
185 | IUserManagement uMan = m_Scenes[0].RequestModuleInterface<IUserManagement>(); | 185 | IUserManagement uMan = m_Scenes[0].RequestModuleInterface<IUserManagement>(); |
186 | m_log.DebugFormat("[HGFRIENDS MODULE]: caching {0}", finfo.Friend); | ||
186 | uMan.AddUser(id, url + ";" + first + " " + last); | 187 | uMan.AddUser(id, url + ";" + first + " " + last); |
187 | } | 188 | } |
188 | } | 189 | } |
@@ -238,6 +239,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
238 | fList.Add(s.Substring(0, 36)); | 239 | fList.Add(s.Substring(0, 36)); |
239 | } | 240 | } |
240 | 241 | ||
242 | // FIXME: also query the presence status of friends in other grids (like in HGStatusNotifier.Notify()) | ||
243 | |||
241 | PresenceInfo[] presence = PresenceService.GetAgents(fList.ToArray()); | 244 | PresenceInfo[] presence = PresenceService.GetAgents(fList.ToArray()); |
242 | foreach (PresenceInfo pi in presence) | 245 | foreach (PresenceInfo pi in presence) |
243 | { | 246 | { |
@@ -251,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
251 | 254 | ||
252 | protected override void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) | 255 | protected override void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) |
253 | { | 256 | { |
254 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID); | 257 | //m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID); |
255 | 258 | ||
256 | // First, let's divide the friends on a per-domain basis | 259 | // First, let's divide the friends on a per-domain basis |
257 | Dictionary<string, List<FriendInfo>> friendsPerDomain = new Dictionary<string, List<FriendInfo>>(); | 260 | Dictionary<string, List<FriendInfo>> friendsPerDomain = new Dictionary<string, List<FriendInfo>>(); |
@@ -293,7 +296,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
293 | 296 | ||
294 | protected override bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) | 297 | protected override bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) |
295 | { | 298 | { |
296 | first = "Unknown"; last = "User"; | 299 | first = "Unknown"; last = "UserHGGAI"; |
297 | if (base.GetAgentInfo(scopeID, fid, out agentID, out first, out last)) | 300 | if (base.GetAgentInfo(scopeID, fid, out agentID, out first, out last)) |
298 | return true; | 301 | return true; |
299 | 302 | ||
@@ -349,7 +352,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
349 | 352 | ||
350 | public override FriendInfo[] GetFriendsFromService(IClientAPI client) | 353 | public override FriendInfo[] GetFriendsFromService(IClientAPI client) |
351 | { | 354 | { |
352 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name); | 355 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name); |
353 | Boolean agentIsLocal = true; | 356 | Boolean agentIsLocal = true; |
354 | if (UserManagementModule != null) | 357 | if (UserManagementModule != null) |
355 | agentIsLocal = UserManagementModule.IsLocalGridUser(client.AgentId); | 358 | agentIsLocal = UserManagementModule.IsLocalGridUser(client.AgentId); |
@@ -362,13 +365,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
362 | AgentCircuitData agentClientCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); | 365 | AgentCircuitData agentClientCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); |
363 | if (agentClientCircuit != null) | 366 | if (agentClientCircuit != null) |
364 | { | 367 | { |
365 | //[XXX] string agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit); | 368 | // Note that this is calling a different interface than base; this one calls with a string param! |
366 | |||
367 | finfos = FriendsService.GetFriends(client.AgentId.ToString()); | 369 | finfos = FriendsService.GetFriends(client.AgentId.ToString()); |
368 | m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, client.AgentId.ToString()); | 370 | m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, client.AgentId.ToString()); |
369 | } | 371 | } |
370 | 372 | ||
371 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name); | 373 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name); |
372 | 374 | ||
373 | return finfos; | 375 | return finfos; |
374 | } | 376 | } |
@@ -658,7 +660,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
658 | FriendsService.Delete(friendUUI, agentID.ToString()); | 660 | FriendsService.Delete(friendUUI, agentID.ToString()); |
659 | 661 | ||
660 | // notify the exfriend's service | 662 | // notify the exfriend's service |
661 | Util.FireAndForget(delegate { Delete(exfriendID, agentID, friendUUI); }); | 663 | Util.FireAndForget( |
664 | delegate { Delete(exfriendID, agentID, friendUUI); }, null, "HGFriendsModule.DeleteFriendshipForeignFriend"); | ||
662 | 665 | ||
663 | m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentID, friendUUI); | 666 | m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentID, friendUUI); |
664 | return true; | 667 | return true; |
@@ -676,7 +679,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
676 | FriendsService.Delete(agentUUI, exfriendID.ToString()); | 679 | FriendsService.Delete(agentUUI, exfriendID.ToString()); |
677 | 680 | ||
678 | // notify the agent's service? | 681 | // notify the agent's service? |
679 | Util.FireAndForget(delegate { Delete(agentID, exfriendID, agentUUI); }); | 682 | Util.FireAndForget( |
683 | delegate { Delete(agentID, exfriendID, agentUUI); }, null, "HGFriendsModule.DeleteFriendshipLocalFriend"); | ||
680 | 684 | ||
681 | m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentUUI, exfriendID); | 685 | m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentUUI, exfriendID); |
682 | return true; | 686 | return true; |