From f2b36f8e7604465ef8357c9b42f359f1877ddd7c Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 25 Feb 2010 04:02:03 +0000 Subject: Implement friend perms --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs') 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 public uint GetFriendPerms(UUID principalID, UUID friendID) { - return 1; + if (!m_Friends.ContainsKey(principalID)) + return 0; + + UserFriendData data = m_Friends[principalID]; + + foreach (FriendInfo fi in data.Friends) + { + if (fi.Friend == friendID.ToString()) + return (uint)fi.TheirFlags; + } + return 0; } private byte[] FailureResult() -- cgit v1.1