aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-02-25 04:02:03 +0000
committerMelanie2010-02-25 04:02:03 +0000
commitf2b36f8e7604465ef8357c9b42f359f1877ddd7c (patch)
treec7e84751ab7ba27df989df8143b4dc5d5e708793
parentBegin tracking users and friends (diff)
downloadopensim-SC_OLD-f2b36f8e7604465ef8357c9b42f359f1877ddd7c.zip
opensim-SC_OLD-f2b36f8e7604465ef8357c9b42f359f1877ddd7c.tar.gz
opensim-SC_OLD-f2b36f8e7604465ef8357c9b42f359f1877ddd7c.tar.bz2
opensim-SC_OLD-f2b36f8e7604465ef8357c9b42f359f1877ddd7c.tar.xz
Implement friend perms
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index df0be97..0d9fd94 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -191,7 +191,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
191 191
192 public uint GetFriendPerms(UUID principalID, UUID friendID) 192 public uint GetFriendPerms(UUID principalID, UUID friendID)
193 { 193 {
194 return 1; 194 if (!m_Friends.ContainsKey(principalID))
195 return 0;
196
197 UserFriendData data = m_Friends[principalID];
198
199 foreach (FriendInfo fi in data.Friends)
200 {
201 if (fi.Friend == friendID.ToString())
202 return (uint)fi.TheirFlags;
203 }
204 return 0;
195 } 205 }
196 206
197 private byte[] FailureResult() 207 private byte[] FailureResult()