diff options
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index d26907b..a896897 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | |||
@@ -133,13 +133,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
133 | UUID objectID, UUID ownerID, string message, UUID textureID, | 133 | UUID objectID, UUID ownerID, string message, UUID textureID, |
134 | int ch, string[] buttonlabels) | 134 | int ch, string[] buttonlabels) |
135 | { | 135 | { |
136 | UserAccount account = m_scene.UserAccountService.GetUserAccount( | 136 | string username = m_scene.UserManagementModule.GetUserName(ownerID); |
137 | m_scene.RegionInfo.ScopeID, ownerID); | 137 | string ownerFirstName, ownerLastName = String.Empty; |
138 | string ownerFirstName, ownerLastName; | 138 | if (!String.IsNullOrEmpty(username)) |
139 | if (account != null) | ||
140 | { | 139 | { |
141 | ownerFirstName = account.FirstName; | 140 | string[] parts = username.Split(' '); |
142 | ownerLastName = account.LastName; | 141 | ownerFirstName = parts[0]; |
142 | if (parts.Length > 1) | ||
143 | ownerLastName = username.Split(' ')[1]; | ||
143 | } | 144 | } |
144 | else | 145 | else |
145 | { | 146 | { |
@@ -170,17 +171,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
170 | } | 171 | } |
171 | 172 | ||
172 | public void SendTextBoxToUser(UUID avatarid, string message, | 173 | public void SendTextBoxToUser(UUID avatarid, string message, |
173 | int chatChannel, string name, UUID objectid, UUID ownerid) | 174 | int chatChannel, string name, UUID objectid, UUID ownerID) |
174 | { | 175 | { |
175 | UserAccount account = m_scene.UserAccountService.GetUserAccount( | 176 | string username = m_scene.UserManagementModule.GetUserName(ownerID); |
176 | m_scene.RegionInfo.ScopeID, ownerid); | 177 | string ownerFirstName, ownerLastName = String.Empty; |
177 | string ownerFirstName, ownerLastName; | 178 | if (!String.IsNullOrEmpty(username)) |
178 | UUID ownerID = UUID.Zero; | ||
179 | if (account != null) | ||
180 | { | 179 | { |
181 | ownerFirstName = account.FirstName; | 180 | string[] parts = username.Split(' '); |
182 | ownerLastName = account.LastName; | 181 | ownerFirstName = parts[0]; |
183 | ownerID = account.PrincipalID; | 182 | if (parts.Length > 1) |
183 | ownerLastName = username.Split(' ')[1]; | ||
184 | } | 184 | } |
185 | else | 185 | else |
186 | { | 186 | { |