aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-30 01:05:29 +0100
committerJustin Clark-Casey (justincc)2012-03-30 01:05:29 +0100
commitbce7964ac2b0e67ff8c8e5ab00bb45b93da219ad (patch)
tree3a34b9280aa700c69ce3ceece1926b5a9304e027 /OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
parentAdd simple login test with online friends. Add IFriendsModule.GrantRights() ... (diff)
downloadopensim-SC_OLD-bce7964ac2b0e67ff8c8e5ab00bb45b93da219ad.zip
opensim-SC_OLD-bce7964ac2b0e67ff8c8e5ab00bb45b93da219ad.tar.gz
opensim-SC_OLD-bce7964ac2b0e67ff8c8e5ab00bb45b93da219ad.tar.bz2
opensim-SC_OLD-bce7964ac2b0e67ff8c8e5ab00bb45b93da219ad.tar.xz
refactor: Move "friends show cache" console command out into separate FriendsCommandsModule.
Expose required methods on IFriendsModule. Rename GetFriends() -> GetFriendsFromCache() for self-documentation
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index b666dae..d3a3ee4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -163,7 +163,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
163 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(client.Scene.RegionInfo.ScopeID, client.AgentId); 163 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(client.Scene.RegionInfo.ScopeID, client.AgentId);
164 if (account == null) // foreign 164 if (account == null) // foreign
165 { 165 {
166 FriendInfo[] friends = GetFriends(client.AgentId); 166 FriendInfo[] friends = GetFriendsFromCache(client.AgentId);
167 foreach (FriendInfo f in friends) 167 foreach (FriendInfo f in friends)
168 { 168 {
169 client.SendChangeUserRights(new UUID(f.Friend), client.AgentId, f.TheirFlags); 169 client.SendChangeUserRights(new UUID(f.Friend), client.AgentId, f.TheirFlags);
@@ -346,7 +346,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
346 346
347 if (agentIsLocal) // agent is local, friend is foreigner 347 if (agentIsLocal) // agent is local, friend is foreigner
348 { 348 {
349 FriendInfo[] finfos = GetFriends(agentID); 349 FriendInfo[] finfos = GetFriendsFromCache(agentID);
350 FriendInfo finfo = GetFriend(finfos, friendID); 350 FriendInfo finfo = GetFriend(finfos, friendID);
351 if (finfo != null) 351 if (finfo != null)
352 { 352 {
@@ -453,7 +453,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
453 bool confirming = false; 453 bool confirming = false;
454 if (friendUUI == string.Empty) 454 if (friendUUI == string.Empty)
455 { 455 {
456 finfos = GetFriends(agentID); 456 finfos = GetFriendsFromCache(agentID);
457 foreach (FriendInfo finfo in finfos) 457 foreach (FriendInfo finfo in finfos)
458 { 458 {
459 if (finfo.TheirFlags == -1) 459 if (finfo.TheirFlags == -1)
@@ -546,7 +546,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
546 // Delete any previous friendship relations 546 // Delete any previous friendship relations
547 FriendInfo[] finfos = null; 547 FriendInfo[] finfos = null;
548 FriendInfo f = null; 548 FriendInfo f = null;
549 finfos = GetFriends(a1); 549 finfos = GetFriendsFromCache(a1);
550 if (finfos != null) 550 if (finfos != null)
551 { 551 {
552 f = GetFriend(finfos, a2); 552 f = GetFriend(finfos, a2);
@@ -558,7 +558,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
558 } 558 }
559 } 559 }
560 560
561 finfos = GetFriends(a2); 561 finfos = GetFriendsFromCache(a2);
562 if (finfos != null) 562 if (finfos != null)
563 { 563 {
564 f = GetFriend(finfos, a1); 564 f = GetFriend(finfos, a1);
@@ -595,7 +595,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
595 if (agentIsLocal) // agent is local, 'friend' is foreigner 595 if (agentIsLocal) // agent is local, 'friend' is foreigner
596 { 596 {
597 // We need to look for its information in the friends list itself 597 // We need to look for its information in the friends list itself
598 FriendInfo[] finfos = GetFriends(agentID); 598 FriendInfo[] finfos = GetFriendsFromCache(agentID);
599 FriendInfo finfo = GetFriend(finfos, exfriendID); 599 FriendInfo finfo = GetFriend(finfos, exfriendID);
600 if (finfo != null) 600 if (finfo != null)
601 { 601 {
@@ -639,7 +639,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
639 private string GetUUI(UUID localUser, UUID foreignUser) 639 private string GetUUI(UUID localUser, UUID foreignUser)
640 { 640 {
641 // Let's see if the user is here by any chance 641 // Let's see if the user is here by any chance
642 FriendInfo[] finfos = GetFriends(localUser); 642 FriendInfo[] finfos = GetFriendsFromCache(localUser);
643 if (finfos != EMPTY_FRIENDS) // friend is here, cool 643 if (finfos != EMPTY_FRIENDS) // friend is here, cool
644 { 644 {
645 FriendInfo finfo = GetFriend(finfos, foreignUser); 645 FriendInfo finfo = GetFriend(finfos, foreignUser);