Merge branch 'master' of opensimulator.org:/var/git/opensim

0.8.2-post-fixes
Melanie Thielker 2015-08-17 18:08:32 +02:00
commit 1de5612d8b
1 changed files with 15 additions and 15 deletions

View File

@ -133,13 +133,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
UUID objectID, UUID ownerID, string message, UUID textureID, UUID objectID, UUID ownerID, string message, UUID textureID,
int ch, string[] buttonlabels) int ch, string[] buttonlabels)
{ {
UserAccount account = m_scene.UserAccountService.GetUserAccount( string username = m_scene.UserManagementModule.GetUserName(ownerID);
m_scene.RegionInfo.ScopeID, ownerID); string ownerFirstName, ownerLastName = String.Empty;
string ownerFirstName, ownerLastName; if (!String.IsNullOrEmpty(username))
if (account != null)
{ {
ownerFirstName = account.FirstName; string[] parts = username.Split(' ');
ownerLastName = account.LastName; ownerFirstName = parts[0];
if (parts.Length > 1)
ownerLastName = username.Split(' ')[1];
} }
else else
{ {
@ -170,17 +171,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
} }
public void SendTextBoxToUser(UUID avatarid, string message, public void SendTextBoxToUser(UUID avatarid, string message,
int chatChannel, string name, UUID objectid, UUID ownerid) int chatChannel, string name, UUID objectid, UUID ownerID)
{ {
UserAccount account = m_scene.UserAccountService.GetUserAccount( string username = m_scene.UserManagementModule.GetUserName(ownerID);
m_scene.RegionInfo.ScopeID, ownerid); string ownerFirstName, ownerLastName = String.Empty;
string ownerFirstName, ownerLastName; if (!String.IsNullOrEmpty(username))
UUID ownerID = UUID.Zero;
if (account != null)
{ {
ownerFirstName = account.FirstName; string[] parts = username.Split(' ');
ownerLastName = account.LastName; ownerFirstName = parts[0];
ownerID = account.PrincipalID; if (parts.Length > 1)
ownerLastName = username.Split(' ')[1];
} }
else else
{ {