diff options
author | Teravus Ovares | 2008-03-03 08:30:36 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-03-03 08:30:36 +0000 |
commit | fe49c96ee0db0974a91b9b175ac1b00aef035797 (patch) | |
tree | 27fb1de9eea228d2e89e1c5b1c83cca8577b3bd9 /OpenSim/Grid | |
parent | * Doh, forgot one license header (diff) | |
download | opensim-SC_OLD-fe49c96ee0db0974a91b9b175ac1b00aef035797.zip opensim-SC_OLD-fe49c96ee0db0974a91b9b175ac1b00aef035797.tar.gz opensim-SC_OLD-fe49c96ee0db0974a91b9b175ac1b00aef035797.tar.bz2 opensim-SC_OLD-fe49c96ee0db0974a91b9b175ac1b00aef035797.tar.xz |
* Applying Ahzz's profile patch. Thanks Ahzz!
* Fixed a few bugs in the patch that are sim crashers.
* There's still a bug in mySQL mode/ grid mode where the main userprofile text doesn't save.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 1 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index fcf9de6..c3d65c4 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -127,6 +127,7 @@ namespace OpenSim.Grid.UserServer | |||
127 | httpServer.AddStreamHandler( | 127 | httpServer.AddStreamHandler( |
128 | new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); | 128 | new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); |
129 | 129 | ||
130 | httpServer.AddXmlRPCHandler("update_user_profile", m_userManager.XmlRpcResponseXmlRPCUpdateUserProfile); | ||
130 | httpServer.Start(); | 131 | httpServer.Start(); |
131 | m_log.Info("[SERVER]: Userserver 0.5 - Startup complete"); | 132 | m_log.Info("[SERVER]: Userserver 0.5 - Startup complete"); |
132 | } | 133 | } |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 367b5d7..153ac75 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -313,6 +313,61 @@ namespace OpenSim.Grid.UserServer | |||
313 | return ProfileToXmlRPCResponse(userProfile); | 313 | return ProfileToXmlRPCResponse(userProfile); |
314 | } | 314 | } |
315 | 315 | ||
316 | |||
317 | public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserProfile(XmlRpcRequest request) | ||
318 | { | ||
319 | m_log.Debug("[UserManager]: Got request to update user profile"); | ||
320 | XmlRpcResponse response = new XmlRpcResponse(); | ||
321 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
322 | Hashtable responseData = new Hashtable(); | ||
323 | |||
324 | UserProfileData userProfile; | ||
325 | if (!requestData.Contains("avatar_uuid")) | ||
326 | { | ||
327 | return CreateUnknownUserErrorResponse(); | ||
328 | } | ||
329 | |||
330 | LLUUID UserUUID = new LLUUID((string)requestData["avatar_uuid"]); | ||
331 | userProfile = GetUserProfile(UserUUID); | ||
332 | if (null == userProfile) | ||
333 | { | ||
334 | return CreateUnknownUserErrorResponse(); | ||
335 | } | ||
336 | // don't know how yet. | ||
337 | if (requestData.Contains("AllowPublish")) | ||
338 | { | ||
339 | } | ||
340 | if (requestData.Contains("FLImageID")) | ||
341 | { | ||
342 | userProfile.profileFirstImage = new LLUUID((string)requestData["FLImageID"]); | ||
343 | } | ||
344 | if (requestData.Contains("ImageID")) | ||
345 | { | ||
346 | userProfile.profileImage = new LLUUID((string)requestData["ImageID"]); | ||
347 | } | ||
348 | // dont' know how yet | ||
349 | if (requestData.Contains("MaturePublish")) | ||
350 | { | ||
351 | } | ||
352 | if (requestData.Contains("AboutText")) | ||
353 | { | ||
354 | userProfile.profileAboutText = (string)requestData["AboutText"]; | ||
355 | } | ||
356 | if (requestData.Contains("FLAboutText")) | ||
357 | { | ||
358 | userProfile.profileFirstText = (string)requestData["FLAboutText"]; | ||
359 | } | ||
360 | // not in DB yet. | ||
361 | if (requestData.Contains("ProfileURL")) | ||
362 | { | ||
363 | } | ||
364 | // call plugin! | ||
365 | bool ret = UpdateUserProfileProperties(userProfile); | ||
366 | responseData["returnString"] = ret.ToString(); | ||
367 | response.Value = responseData; | ||
368 | return response; | ||
369 | } | ||
370 | |||
316 | public XmlRpcResponse XmlRPCLogOffUserMethodUUID(XmlRpcRequest request) | 371 | public XmlRpcResponse XmlRPCLogOffUserMethodUUID(XmlRpcRequest request) |
317 | { | 372 | { |
318 | XmlRpcResponse response = new XmlRpcResponse(); | 373 | XmlRpcResponse response = new XmlRpcResponse(); |