mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
Fix scope support to get friends list names across co-hosted grids
This commit is contained in:
@@ -485,7 +485,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
return user.FirstName + " " + user.LastName;
|
||||
}
|
||||
|
||||
public virtual Dictionary<UUID,string> GetUsersNames(string[] ids)
|
||||
public virtual Dictionary<UUID,string> GetUsersNames(string[] ids, UUID scopeID)
|
||||
{
|
||||
Dictionary<UUID,string> ret = new Dictionary<UUID,string>();
|
||||
if(m_Scenes.Count <= 0)
|
||||
@@ -528,7 +528,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
|
||||
// try user account service
|
||||
List<UserAccount> accounts = m_Scenes[0].UserAccountService.GetUserAccounts(
|
||||
m_Scenes[0].RegionInfo.ScopeID, missing);
|
||||
scopeID, missing);
|
||||
|
||||
if(accounts.Count != 0)
|
||||
{
|
||||
|
||||
@@ -164,6 +164,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
|
||||
public override List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
|
||||
{
|
||||
m_log.DebugFormat("[REMOTE USER ACCOUNTS]: Request for {0} records", IDs.Count);
|
||||
List<UserAccount> accs = new List<UserAccount>();
|
||||
List<string> missing = new List<string>();
|
||||
|
||||
@@ -177,9 +178,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
{
|
||||
account = m_Cache.Get(uuid, out inCache);
|
||||
if (inCache)
|
||||
{
|
||||
accs.Add(account);
|
||||
m_log.DebugFormat("[REMOTE USER ACCOUNTS]: Found in cache: {0}, is null {1}", uuid, account == null);
|
||||
}
|
||||
else
|
||||
{
|
||||
missing.Add(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +204,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
}
|
||||
}
|
||||
}
|
||||
m_log.DebugFormat("[REMOTE USER ACCOUNTS]: returned {0} records", accs.Count);
|
||||
return accs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user