diff options
author | Dr Scofield | 2009-05-12 15:12:21 +0000 |
---|---|---|
committer | Dr Scofield | 2009-05-12 15:12:21 +0000 |
commit | 8039946c76389d37a3e5a48da008326022840f43 (patch) | |
tree | 2dffd3c7b070925ae29c86df5ae767e40ed32d25 | |
parent | Paving the way for syncing group permissions across a grid (diff) | |
download | opensim-SC_OLD-8039946c76389d37a3e5a48da008326022840f43.zip opensim-SC_OLD-8039946c76389d37a3e5a48da008326022840f43.tar.gz opensim-SC_OLD-8039946c76389d37a3e5a48da008326022840f43.tar.bz2 opensim-SC_OLD-8039946c76389d37a3e5a48da008326022840f43.tar.xz |
more fixes to default avatar appearance creation
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 61ccc74..e499f64 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -162,6 +162,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
162 | 162 | ||
163 | public void PostInitialise() | 163 | public void PostInitialise() |
164 | { | 164 | { |
165 | if (!createDefaultAvatars()) | ||
166 | { | ||
167 | m_log.Info("[RADMIN]: Default avatars not loaded"); | ||
168 | } | ||
165 | } | 169 | } |
166 | 170 | ||
167 | public XmlRpcResponse XmlRpcRestartMethod(XmlRpcRequest request) | 171 | public XmlRpcResponse XmlRpcRestartMethod(XmlRpcRequest request) |
@@ -904,8 +908,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
904 | firstname, lastname)); | 908 | firstname, lastname)); |
905 | 909 | ||
906 | // Establish the avatar's initial appearance | 910 | // Establish the avatar's initial appearance |
907 | // TODO: need to add code to do this only when requested | 911 | |
908 | // updateUserAppearance(responseData, requestData, userID); | 912 | updateUserAppearance(responseData, requestData, userID); |
909 | 913 | ||
910 | responseData["success"] = true; | 914 | responseData["success"] = true; |
911 | responseData["avatar_uuid"] = userID.ToString(); | 915 | responseData["avatar_uuid"] = userID.ToString(); |
@@ -1131,14 +1135,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1131 | if (String.Empty != aboutAvatar) userProfile.AboutText = aboutAvatar; | 1135 | if (String.Empty != aboutAvatar) userProfile.AboutText = aboutAvatar; |
1132 | 1136 | ||
1133 | // User has been created. Now establish gender and appearance. | 1137 | // User has been created. Now establish gender and appearance. |
1134 | // Default appearance is 'Default Male'. Specifying gender can | ||
1135 | // establish "Default Female". Specifying a specific model can | ||
1136 | // establish a specific appearance without regard for gender. | ||
1137 | 1138 | ||
1138 | // TODO: need to add code to do this only when | 1139 | updateUserAppearance(responseData, requestData, userProfile.ID); |
1139 | // requested | ||
1140 | if (requestData.ContainsKey("model")) | ||
1141 | updateUserAppearance(responseData, requestData, userProfile.ID); | ||
1142 | 1140 | ||
1143 | if (!m_app.CommunicationsManager.UserService.UpdateUserProfile(userProfile)) | 1141 | if (!m_app.CommunicationsManager.UserService.UpdateUserProfile(userProfile)) |
1144 | throw new Exception("did not manage to update user profile"); | 1142 | throw new Exception("did not manage to update user profile"); |
@@ -1165,6 +1163,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1165 | 1163 | ||
1166 | m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); | 1164 | m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); |
1167 | return response; | 1165 | return response; |
1166 | |||
1168 | } | 1167 | } |
1169 | 1168 | ||
1170 | /// <summary> | 1169 | /// <summary> |
@@ -1207,12 +1206,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1207 | // Has an explicit model been specified? | 1206 | // Has an explicit model been specified? |
1208 | 1207 | ||
1209 | if (requestData.Contains("model")) | 1208 | if (requestData.Contains("model")) |
1209 | { | ||
1210 | model = (string)requestData["model"]; | 1210 | model = (string)requestData["model"]; |
1211 | } | ||
1211 | 1212 | ||
1212 | // No appearance attributes were set | 1213 | // No appearance attributes were set |
1213 | 1214 | ||
1214 | if (model == String.Empty) | 1215 | if(model == String.Empty) |
1216 | { | ||
1217 | m_log.DebugFormat("[RADMIN] Appearance update not requested"); | ||
1215 | return; | 1218 | return; |
1219 | } | ||
1216 | 1220 | ||
1217 | m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model {1}", userid, model); | 1221 | m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model {1}", userid, model); |
1218 | 1222 | ||
@@ -1238,9 +1242,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1238 | // Set current user's appearance. This bit is easy. The appearance structure is populated with | 1242 | // Set current user's appearance. This bit is easy. The appearance structure is populated with |
1239 | // actual asset ids, however to complete the magic we need to populate the inventory with the | 1243 | // actual asset ids, however to complete the magic we need to populate the inventory with the |
1240 | // assets in question. | 1244 | // assets in question. |
1241 | 1245 | ||
1242 | establishAppearance(userid, mprof.ID); | 1246 | establishAppearance(userid, mprof.ID); |
1243 | 1247 | ||
1244 | m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", | 1248 | m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", |
1245 | userid, model); | 1249 | userid, model); |
1246 | } | 1250 | } |
@@ -1379,8 +1383,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1379 | private bool createDefaultAvatars() | 1383 | private bool createDefaultAvatars() |
1380 | { | 1384 | { |
1381 | 1385 | ||
1382 | m_log.DebugFormat("[RADMIN] Creating default avatar entries"); | ||
1383 | |||
1384 | // Only load once | 1386 | // Only load once |
1385 | 1387 | ||
1386 | if (daload) | 1388 | if (daload) |
@@ -1388,6 +1390,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1388 | return false; | 1390 | return false; |
1389 | } | 1391 | } |
1390 | 1392 | ||
1393 | m_log.DebugFormat("[RADMIN] Creating default avatar entries"); | ||
1394 | |||
1391 | daload = true; | 1395 | daload = true; |
1392 | 1396 | ||
1393 | // Load processing starts here... | 1397 | // Load processing starts here... |