diff options
author | Diva Canto | 2011-05-21 16:48:00 -0700 |
---|---|---|
committer | Diva Canto | 2011-05-21 16:48:00 -0700 |
commit | 58c53c41de2cae0bb041a2e8121792e136d1edb2 (patch) | |
tree | b792158cd178f88234f86ab4d72c4224b45fe6ba /OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-58c53c41de2cae0bb041a2e8121792e136d1edb2.zip opensim-SC_OLD-58c53c41de2cae0bb041a2e8121792e136d1edb2.tar.gz opensim-SC_OLD-58c53c41de2cae0bb041a2e8121792e136d1edb2.tar.bz2 opensim-SC_OLD-58c53c41de2cae0bb041a2e8121792e136d1edb2.tar.xz |
Fixed permissions bug related to friends in PermissionsModule. Added FriendsData[] GetFriends(string principalID) to IFriendsData and FriendInfo[] GetFriends(string PrincipalID) to IFriendsService. Refactored some more in the FriendsModule. Made client get notification of local friends permissions upon HGLogin. HG Friends object permissions work.
Diffstat (limited to 'OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs index 64002e1..71c3c73 100644 --- a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs | |||
@@ -82,6 +82,9 @@ namespace OpenSim.Server.Handlers.Friends | |||
82 | case "getfriends": | 82 | case "getfriends": |
83 | return GetFriends(request); | 83 | return GetFriends(request); |
84 | 84 | ||
85 | case "getfriends_string": | ||
86 | return GetFriendsString(request); | ||
87 | |||
85 | case "storefriend": | 88 | case "storefriend": |
86 | return StoreFriend(request); | 89 | return StoreFriend(request); |
87 | 90 | ||
@@ -111,7 +114,25 @@ namespace OpenSim.Server.Handlers.Friends | |||
111 | m_log.WarnFormat("[FRIENDS HANDLER]: no principalID in request to get friends"); | 114 | m_log.WarnFormat("[FRIENDS HANDLER]: no principalID in request to get friends"); |
112 | 115 | ||
113 | FriendInfo[] finfos = m_FriendsService.GetFriends(principalID); | 116 | FriendInfo[] finfos = m_FriendsService.GetFriends(principalID); |
114 | //m_log.DebugFormat("[FRIENDS HANDLER]: neighbours for region {0}: {1}", regionID, rinfos.Count); | 117 | |
118 | return PackageFriends(finfos); | ||
119 | } | ||
120 | |||
121 | byte[] GetFriendsString(Dictionary<string, object> request) | ||
122 | { | ||
123 | string principalID = string.Empty; | ||
124 | if (request.ContainsKey("PRINCIPALID")) | ||
125 | principalID = request["PRINCIPALID"].ToString(); | ||
126 | else | ||
127 | m_log.WarnFormat("[FRIENDS HANDLER]: no principalID in request to get friends"); | ||
128 | |||
129 | FriendInfo[] finfos = m_FriendsService.GetFriends(principalID); | ||
130 | |||
131 | return PackageFriends(finfos); | ||
132 | } | ||
133 | |||
134 | private byte[] PackageFriends(FriendInfo[] finfos) | ||
135 | { | ||
115 | 136 | ||
116 | Dictionary<string, object> result = new Dictionary<string, object>(); | 137 | Dictionary<string, object> result = new Dictionary<string, object>(); |
117 | if ((finfos == null) || ((finfos != null) && (finfos.Length == 0))) | 138 | if ((finfos == null) || ((finfos != null) && (finfos.Length == 0))) |