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