Improvement of fetching name in groups
parent
701e15760c
commit
f3d31e6e53
|
@ -1402,17 +1402,16 @@ namespace OpenSim.Groups
|
||||||
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||||
|
|
||||||
// TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
|
// TODO: All the client update functions need to be reexamined because most do too much and send too much stuff
|
||||||
UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID);
|
string firstname = "Unknown", lastname = "Unknown";
|
||||||
string firstname, lastname;
|
string name = m_UserManagement.GetUserName(dataForAgentID);
|
||||||
if (account != null)
|
if (!string.IsNullOrEmpty(name))
|
||||||
{
|
{
|
||||||
firstname = account.FirstName;
|
string[] parts = name.Split(new char[] { ' ' });
|
||||||
lastname = account.LastName;
|
if (parts.Length >= 2)
|
||||||
}
|
{
|
||||||
else
|
firstname = parts[0];
|
||||||
{
|
lastname = parts[1];
|
||||||
firstname = "Unknown";
|
}
|
||||||
lastname = "Unknown";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname,
|
remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname,
|
||||||
|
|
Loading…
Reference in New Issue