mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
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.
This commit is contained in:
@@ -82,6 +82,9 @@ namespace OpenSim.Server.Handlers.Friends
|
||||
case "getfriends":
|
||||
return GetFriends(request);
|
||||
|
||||
case "getfriends_string":
|
||||
return GetFriendsString(request);
|
||||
|
||||
case "storefriend":
|
||||
return StoreFriend(request);
|
||||
|
||||
@@ -111,7 +114,25 @@ namespace OpenSim.Server.Handlers.Friends
|
||||
m_log.WarnFormat("[FRIENDS HANDLER]: no principalID in request to get friends");
|
||||
|
||||
FriendInfo[] finfos = m_FriendsService.GetFriends(principalID);
|
||||
//m_log.DebugFormat("[FRIENDS HANDLER]: neighbours for region {0}: {1}", regionID, rinfos.Count);
|
||||
|
||||
return PackageFriends(finfos);
|
||||
}
|
||||
|
||||
byte[] GetFriendsString(Dictionary<string, object> request)
|
||||
{
|
||||
string principalID = string.Empty;
|
||||
if (request.ContainsKey("PRINCIPALID"))
|
||||
principalID = request["PRINCIPALID"].ToString();
|
||||
else
|
||||
m_log.WarnFormat("[FRIENDS HANDLER]: no principalID in request to get friends");
|
||||
|
||||
FriendInfo[] finfos = m_FriendsService.GetFriends(principalID);
|
||||
|
||||
return PackageFriends(finfos);
|
||||
}
|
||||
|
||||
private byte[] PackageFriends(FriendInfo[] finfos)
|
||||
{
|
||||
|
||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
if ((finfos == null) || ((finfos != null) && (finfos.Length == 0)))
|
||||
|
||||
Reference in New Issue
Block a user