diff options
author | Diva Canto | 2013-07-23 11:29:53 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-23 14:30:50 -0700 |
commit | 42e52f544df5210b41b96176c364d1f1d2d96b00 (patch) | |
tree | 410b770e861a922fc88f831f5969345ab6fa104e | |
parent | Don't post Link asset types back to the home grid (diff) | |
download | opensim-SC_OLD-42e52f544df5210b41b96176c364d1f1d2d96b00.zip opensim-SC_OLD-42e52f544df5210b41b96176c364d1f1d2d96b00.tar.gz opensim-SC_OLD-42e52f544df5210b41b96176c364d1f1d2d96b00.tar.bz2 opensim-SC_OLD-42e52f544df5210b41b96176c364d1f1d2d96b00.tar.xz |
Improvement of fetching name in groups
-rw-r--r-- | OpenSim/Addons/Groups/GroupsModule.cs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 82e2d6f..69d03a9 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -1402,19 +1402,18 @@ namespace OpenSim.Groups | |||
1402 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 1402 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
1403 | 1403 | ||
1404 | // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff | 1404 | // TODO: All the client update functions need to be reexamined because most do too much and send too much stuff |
1405 | UserAccount account = m_sceneList[0].UserAccountService.GetUserAccount(remoteClient.Scene.RegionInfo.ScopeID, dataForAgentID); | 1405 | string firstname = "Unknown", lastname = "Unknown"; |
1406 | string firstname, lastname; | 1406 | string name = m_UserManagement.GetUserName(dataForAgentID); |
1407 | if (account != null) | 1407 | if (!string.IsNullOrEmpty(name)) |
1408 | { | ||
1409 | firstname = account.FirstName; | ||
1410 | lastname = account.LastName; | ||
1411 | } | ||
1412 | else | ||
1413 | { | 1408 | { |
1414 | firstname = "Unknown"; | 1409 | string[] parts = name.Split(new char[] { ' ' }); |
1415 | lastname = "Unknown"; | 1410 | if (parts.Length >= 2) |
1411 | { | ||
1412 | firstname = parts[0]; | ||
1413 | lastname = parts[1]; | ||
1414 | } | ||
1416 | } | 1415 | } |
1417 | 1416 | ||
1418 | remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname, | 1417 | remoteClient.SendAgentDataUpdate(dataForAgentID, activeGroupID, firstname, |
1419 | lastname, activeGroupPowers, activeGroupName, | 1418 | lastname, activeGroupPowers, activeGroupName, |
1420 | activeGroupTitle); | 1419 | activeGroupTitle); |