aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Dialog
diff options
context:
space:
mode:
authorCinder2015-08-16 14:54:15 -0600
committerDiva Canto2015-08-16 21:13:42 -0700
commitfc6fe75268d611fe1f4f87e698ae3df8e152c983 (patch)
tree39189afd0718be9afde51451621deb85c2b2f571 /OpenSim/Region/CoreModules/Avatar/Dialog
parentMake Setup_XXX=disabled not even load the module at all, rather than (diff)
downloadopensim-SC_OLD-fc6fe75268d611fe1f4f87e698ae3df8e152c983.zip
opensim-SC_OLD-fc6fe75268d611fe1f4f87e698ae3df8e152c983.tar.gz
opensim-SC_OLD-fc6fe75268d611fe1f4f87e698ae3df8e152c983.tar.bz2
opensim-SC_OLD-fc6fe75268d611fe1f4f87e698ae3df8e152c983.tar.xz
MANTIS-7684 - Use the user management module to get username for script dialogs
Signed-off-by: Diva Canto <diva@metaverseink.com>
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Dialog')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs22
1 files changed, 9 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index d26907b..4b41867 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -133,13 +133,12 @@ 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);
138 string ownerFirstName, ownerLastName; 137 string ownerFirstName, ownerLastName;
139 if (account != null) 138 if (!String.IsNullOrEmpty(username))
140 { 139 {
141 ownerFirstName = account.FirstName; 140 ownerFirstName = username.Split(' ')[0];
142 ownerLastName = account.LastName; 141 ownerLastName = username.Split(' ')[1];
143 } 142 }
144 else 143 else
145 { 144 {
@@ -170,17 +169,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
170 } 169 }
171 170
172 public void SendTextBoxToUser(UUID avatarid, string message, 171 public void SendTextBoxToUser(UUID avatarid, string message,
173 int chatChannel, string name, UUID objectid, UUID ownerid) 172 int chatChannel, string name, UUID objectid, UUID ownerID)
174 { 173 {
175 UserAccount account = m_scene.UserAccountService.GetUserAccount( 174 string username = m_scene.UserManagementModule.GetUserName(ownerID);
176 m_scene.RegionInfo.ScopeID, ownerid);
177 string ownerFirstName, ownerLastName; 175 string ownerFirstName, ownerLastName;
178 UUID ownerID = UUID.Zero; 176 if (!String.IsNullOrEmpty(username))
179 if (account != null)
180 { 177 {
181 ownerFirstName = account.FirstName; 178 ownerFirstName = username.Split(' ')[0];
182 ownerLastName = account.LastName; 179 ownerLastName = username.Split(' ')[1];
183 ownerID = account.PrincipalID;
184 } 180 }
185 else 181 else
186 { 182 {