Minor improvement of previous patch.

0.8.2-post-fixes
Diva Canto 2015-08-16 21:23:41 -07:00
parent fc6fe75268
commit 0cdd1165c8
1 changed files with 10 additions and 6 deletions

View File

@ -134,11 +134,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
int ch, string[] buttonlabels)
{
string username = m_scene.UserManagementModule.GetUserName(ownerID);
string ownerFirstName, ownerLastName;
string ownerFirstName, ownerLastName = String.Empty;
if (!String.IsNullOrEmpty(username))
{
ownerFirstName = username.Split(' ')[0];
ownerLastName = username.Split(' ')[1];
string[] parts = username.Split(' ');
ownerFirstName = parts[0];
if (parts.Length > 1)
ownerLastName = username.Split(' ')[1];
}
else
{
@ -172,11 +174,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
int chatChannel, string name, UUID objectid, UUID ownerID)
{
string username = m_scene.UserManagementModule.GetUserName(ownerID);
string ownerFirstName, ownerLastName;
string ownerFirstName, ownerLastName = String.Empty;
if (!String.IsNullOrEmpty(username))
{
ownerFirstName = username.Split(' ')[0];
ownerLastName = username.Split(' ')[1];
string[] parts = username.Split(' ');
ownerFirstName = parts[0];
if (parts.Length > 1)
ownerLastName = username.Split(' ')[1];
}
else
{