mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
several changes to llIsFriend and related methods
This commit is contained in:
@@ -207,7 +207,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
if (!m_Enabled)
|
||||
return;
|
||||
|
||||
// m_log.DebugFormat("[FRIENDS MODULE]: AddRegion on {0}", Name);
|
||||
//m_log.DebugFormat("[FRIENDS MODULE]: AddRegion on {0}", Name);
|
||||
|
||||
m_Scenes.Add(scene);
|
||||
scene.RegisterModuleInterface<IFriendsModule>(this);
|
||||
@@ -254,6 +254,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
return 0;
|
||||
}
|
||||
|
||||
public bool IsFriend(UUID principalID, UUID friendID)
|
||||
{
|
||||
FriendInfo[] friends = GetFriendsFromCache(principalID);
|
||||
if (friends.Length > 0)
|
||||
{
|
||||
FriendInfo finfo = GetFriend(friends, friendID);
|
||||
return (finfo is not null && finfo.TheirFlags != -1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsFriendOnline(UUID userID, UUID friendID)
|
||||
{
|
||||
if(m_OnlineFriendsCache.TryGetValue(userID, out HashSet<UUID> friends))
|
||||
|
||||
Reference in New Issue
Block a user