From 8039946c76389d37a3e5a48da008326022840f43 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Tue, 12 May 2009 15:12:21 +0000 Subject: more fixes to default avatar appearance creation --- .../RemoteController/RemoteAdminPlugin.cs | 32 ++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'OpenSim/ApplicationPlugins') 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 public void PostInitialise() { + if (!createDefaultAvatars()) + { + m_log.Info("[RADMIN]: Default avatars not loaded"); + } } public XmlRpcResponse XmlRpcRestartMethod(XmlRpcRequest request) @@ -904,8 +908,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController firstname, lastname)); // Establish the avatar's initial appearance - // TODO: need to add code to do this only when requested - // updateUserAppearance(responseData, requestData, userID); + + updateUserAppearance(responseData, requestData, userID); responseData["success"] = true; responseData["avatar_uuid"] = userID.ToString(); @@ -1131,14 +1135,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (String.Empty != aboutAvatar) userProfile.AboutText = aboutAvatar; // User has been created. Now establish gender and appearance. - // Default appearance is 'Default Male'. Specifying gender can - // establish "Default Female". Specifying a specific model can - // establish a specific appearance without regard for gender. - // TODO: need to add code to do this only when - // requested - if (requestData.ContainsKey("model")) - updateUserAppearance(responseData, requestData, userProfile.ID); + updateUserAppearance(responseData, requestData, userProfile.ID); if (!m_app.CommunicationsManager.UserService.UpdateUserProfile(userProfile)) throw new Exception("did not manage to update user profile"); @@ -1165,6 +1163,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController m_log.Info("[RADMIN]: UpdateUserAccount: request complete"); return response; + } /// @@ -1207,12 +1206,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController // Has an explicit model been specified? if (requestData.Contains("model")) + { model = (string)requestData["model"]; + } // No appearance attributes were set - if (model == String.Empty) + if(model == String.Empty) + { + m_log.DebugFormat("[RADMIN] Appearance update not requested"); return; + } m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model {1}", userid, model); @@ -1238,9 +1242,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController // Set current user's appearance. This bit is easy. The appearance structure is populated with // actual asset ids, however to complete the magic we need to populate the inventory with the // assets in question. - + establishAppearance(userid, mprof.ID); - + m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", userid, model); } @@ -1379,8 +1383,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController private bool createDefaultAvatars() { - m_log.DebugFormat("[RADMIN] Creating default avatar entries"); - // Only load once if (daload) @@ -1388,6 +1390,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController return false; } + m_log.DebugFormat("[RADMIN] Creating default avatar entries"); + daload = true; // Load processing starts here... -- cgit v1.1