diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index 02b417f..9a97925 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | |||
@@ -30,7 +30,6 @@ using System.Collections; | |||
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Threading; | 32 | using System.Threading; |
33 | |||
34 | using log4net; | 33 | using log4net; |
35 | using Nini.Config; | 34 | using Nini.Config; |
36 | using Nwc.XmlRpc; | 35 | using Nwc.XmlRpc; |
@@ -84,9 +83,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
84 | 83 | ||
85 | #endregion | 84 | #endregion |
86 | 85 | ||
87 | protected override bool FetchFriendslist(IClientAPI client) | 86 | protected override bool CacheFriends(IClientAPI client) |
88 | { | 87 | { |
89 | if (base.FetchFriendslist(client)) | 88 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entered CacheFriends for {0}", client.Name); |
89 | |||
90 | if (base.CacheFriends(client)) | ||
90 | { | 91 | { |
91 | UUID agentID = client.AgentId; | 92 | UUID agentID = client.AgentId; |
92 | // we do this only for the root agent | 93 | // we do this only for the root agent |
@@ -110,14 +111,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
110 | } | 111 | } |
111 | } | 112 | } |
112 | } | 113 | } |
114 | |||
115 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting CacheFriends for {0} since detected root agent", client.Name); | ||
113 | return true; | 116 | return true; |
114 | } | 117 | } |
115 | } | 118 | } |
119 | |||
120 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting CacheFriends for {0} since detected not root agent", client.Name); | ||
116 | return false; | 121 | return false; |
117 | } | 122 | } |
118 | 123 | ||
119 | public override bool SendFriendsOnlineIfNeeded(IClientAPI client) | 124 | public override bool SendFriendsOnlineIfNeeded(IClientAPI client) |
120 | { | 125 | { |
126 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering SendFriendsOnlineIfNeeded for {0}", client.Name); | ||
127 | |||
121 | if (base.SendFriendsOnlineIfNeeded(client)) | 128 | if (base.SendFriendsOnlineIfNeeded(client)) |
122 | { | 129 | { |
123 | AgentCircuitData aCircuit = ((Scene)client.Scene).AuthenticateHandler.GetAgentCircuitData(client.AgentId); | 130 | AgentCircuitData aCircuit = ((Scene)client.Scene).AuthenticateHandler.GetAgentCircuitData(client.AgentId); |
@@ -134,11 +141,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
134 | } | 141 | } |
135 | } | 142 | } |
136 | } | 143 | } |
144 | |||
145 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting SendFriendsOnlineIfNeeded for {0}", client.Name); | ||
137 | return false; | 146 | return false; |
138 | } | 147 | } |
139 | 148 | ||
140 | protected override void GetOnlineFriends(UUID userID, List<string> friendList, /*collector*/ List<UUID> online) | 149 | protected override void GetOnlineFriends(UUID userID, List<string> friendList, /*collector*/ List<UUID> online) |
141 | { | 150 | { |
151 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetOnlineFriends for {0}", userID); | ||
152 | |||
142 | List<string> fList = new List<string>(); | 153 | List<string> fList = new List<string>(); |
143 | foreach (string s in friendList) | 154 | foreach (string s in friendList) |
144 | { | 155 | { |
@@ -157,6 +168,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
157 | if (UUID.TryParse(pi.UserID, out presenceID)) | 168 | if (UUID.TryParse(pi.UserID, out presenceID)) |
158 | online.Add(presenceID); | 169 | online.Add(presenceID); |
159 | } | 170 | } |
171 | |||
172 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetOnlineFriends for {0}", userID); | ||
160 | } | 173 | } |
161 | 174 | ||
162 | //protected override void GetOnlineFriends(UUID userID, List<string> friendList, /*collector*/ List<UUID> online) | 175 | //protected override void GetOnlineFriends(UUID userID, List<string> friendList, /*collector*/ List<UUID> online) |
@@ -246,6 +259,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
246 | 259 | ||
247 | protected override void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) | 260 | protected override void StatusNotify(List<FriendInfo> friendList, UUID userID, bool online) |
248 | { | 261 | { |
262 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID); | ||
263 | |||
249 | // First, let's divide the friends on a per-domain basis | 264 | // First, let's divide the friends on a per-domain basis |
250 | Dictionary<string, List<FriendInfo>> friendsPerDomain = new Dictionary<string, List<FriendInfo>>(); | 265 | Dictionary<string, List<FriendInfo>> friendsPerDomain = new Dictionary<string, List<FriendInfo>>(); |
251 | foreach (FriendInfo friend in friendList) | 266 | foreach (FriendInfo friend in friendList) |
@@ -298,6 +313,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
298 | } | 313 | } |
299 | } | 314 | } |
300 | } | 315 | } |
316 | |||
317 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting StatusNotify for {0}", userID); | ||
301 | } | 318 | } |
302 | 319 | ||
303 | protected override bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) | 320 | protected override bool GetAgentInfo(UUID scopeID, string fid, out UUID agentID, out string first, out string last) |
@@ -351,6 +368,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
351 | 368 | ||
352 | protected override FriendInfo[] GetFriendsFromService(IClientAPI client) | 369 | protected override FriendInfo[] GetFriendsFromService(IClientAPI client) |
353 | { | 370 | { |
371 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name); | ||
372 | |||
354 | UserAccount account1 = UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, client.AgentId); | 373 | UserAccount account1 = UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, client.AgentId); |
355 | if (account1 != null) | 374 | if (account1 != null) |
356 | return base.GetFriendsFromService(client); | 375 | return base.GetFriendsFromService(client); |
@@ -365,6 +384,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
365 | finfos = FriendsService.GetFriends(agentUUI); | 384 | finfos = FriendsService.GetFriends(agentUUI); |
366 | m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, agentUUI); | 385 | m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, agentUUI); |
367 | } | 386 | } |
387 | |||
388 | // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name); | ||
389 | |||
368 | return finfos; | 390 | return finfos; |
369 | } | 391 | } |
370 | 392 | ||
@@ -401,7 +423,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
401 | } | 423 | } |
402 | 424 | ||
403 | return false; | 425 | return false; |
404 | |||
405 | } | 426 | } |
406 | 427 | ||
407 | protected override void StoreBackwards(UUID friendID, UUID agentID) | 428 | protected override void StoreBackwards(UUID friendID, UUID agentID) |
@@ -627,4 +648,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
627 | } | 648 | } |
628 | } | 649 | } |
629 | } | 650 | } |
630 | } | 651 | } \ No newline at end of file |