aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Null/NullFriendsData.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-14 18:08:02 +0000
committerJustin Clark-Casey (justincc)2011-11-14 18:08:02 +0000
commit348d15707d129c99bc79cd35d544bc62b9a6f1b2 (patch)
treee1377950e09d753d2979134dd96e253ce83e5be9 /OpenSim/Data/Null/NullFriendsData.cs
parentAdd very simple FriendsModuleTests.TestNoFriends() (diff)
downloadopensim-SC-348d15707d129c99bc79cd35d544bc62b9a6f1b2.zip
opensim-SC-348d15707d129c99bc79cd35d544bc62b9a6f1b2.tar.gz
opensim-SC-348d15707d129c99bc79cd35d544bc62b9a6f1b2.tar.bz2
opensim-SC-348d15707d129c99bc79cd35d544bc62b9a6f1b2.tar.xz
Add test for adding a friend whilst online
Diffstat (limited to 'OpenSim/Data/Null/NullFriendsData.cs')
-rw-r--r--OpenSim/Data/Null/NullFriendsData.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Data/Null/NullFriendsData.cs b/OpenSim/Data/Null/NullFriendsData.cs
index d90788a..0a4b242 100644
--- a/OpenSim/Data/Null/NullFriendsData.cs
+++ b/OpenSim/Data/Null/NullFriendsData.cs
@@ -56,13 +56,21 @@ namespace OpenSim.Data.Null
56 /// <returns></returns> 56 /// <returns></returns>
57 public FriendsData[] GetFriends(string userID) 57 public FriendsData[] GetFriends(string userID)
58 { 58 {
59 List<FriendsData> lst = m_Data.FindAll(delegate (FriendsData fdata) 59 List<FriendsData> lst = m_Data.FindAll(fdata =>
60 { 60 {
61 return fdata.PrincipalID == userID.ToString(); 61 return fdata.PrincipalID == userID.ToString();
62 }); 62 });
63 63
64 if (lst != null) 64 if (lst != null)
65 {
66 lst.ForEach(f =>
67 {
68 FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID);
69 if (f2 != null) { f.Data["TheirFlags"] = f2.Data["Flags"]; }
70 });
71
65 return lst.ToArray(); 72 return lst.ToArray();
73 }
66 74
67 return new FriendsData[0]; 75 return new FriendsData[0];
68 } 76 }