aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index 4b41867..a896897 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -134,11 +134,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
134 int ch, string[] buttonlabels) 134 int ch, string[] buttonlabels)
135 { 135 {
136 string username = m_scene.UserManagementModule.GetUserName(ownerID); 136 string username = m_scene.UserManagementModule.GetUserName(ownerID);
137 string ownerFirstName, ownerLastName; 137 string ownerFirstName, ownerLastName = String.Empty;
138 if (!String.IsNullOrEmpty(username)) 138 if (!String.IsNullOrEmpty(username))
139 { 139 {
140 ownerFirstName = username.Split(' ')[0]; 140 string[] parts = username.Split(' ');
141 ownerLastName = username.Split(' ')[1]; 141 ownerFirstName = parts[0];
142 if (parts.Length > 1)
143 ownerLastName = username.Split(' ')[1];
142 } 144 }
143 else 145 else
144 { 146 {
@@ -172,11 +174,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
172 int chatChannel, string name, UUID objectid, UUID ownerID) 174 int chatChannel, string name, UUID objectid, UUID ownerID)
173 { 175 {
174 string username = m_scene.UserManagementModule.GetUserName(ownerID); 176 string username = m_scene.UserManagementModule.GetUserName(ownerID);
175 string ownerFirstName, ownerLastName; 177 string ownerFirstName, ownerLastName = String.Empty;
176 if (!String.IsNullOrEmpty(username)) 178 if (!String.IsNullOrEmpty(username))
177 { 179 {
178 ownerFirstName = username.Split(' ')[0]; 180 string[] parts = username.Split(' ');
179 ownerLastName = username.Split(' ')[1]; 181 ownerFirstName = parts[0];
182 if (parts.Length > 1)
183 ownerLastName = username.Split(' ')[1];
180 } 184 }
181 else 185 else
182 { 186 {