From fe49c96ee0db0974a91b9b175ac1b00aef035797 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 3 Mar 2008 08:30:36 +0000 Subject: * 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. --- .../Region/Communications/OGS1/OGS1UserServices.cs | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'OpenSim/Region/Communications/OGS1/OGS1UserServices.cs') diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 8ad4468..7dcbb46 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -270,6 +270,48 @@ namespace OpenSim.Region.Communications.OGS1 throw new Exception("The method or operation is not implemented."); } + public bool UpdateUserProfileProperties(UserProfileData UserProfile) + { + m_log.Debug("[OGS1UserService]: Asking UserServer to update profile."); + Hashtable param = new Hashtable(); + param["avatar_uuid"] = UserProfile.UUID.ToString(); + //param["AllowPublish"] = UserProfile.ToString(); + param["FLImageID"] = UserProfile.profileFirstImage.ToString(); + param["ImageID"] = UserProfile.profileImage.ToString(); + //param["MaturePublish"] = MaturePublish.ToString(); + param["AboutText"] = UserProfile.profileAboutText; + param["FLAboutText"] = UserProfile.profileFirstText; + //param["ProfileURL"] = UserProfile.ProfileURL.ToString(); + IList parameters = new ArrayList(); + parameters.Add(param); + + XmlRpcRequest req = new XmlRpcRequest("update_user_profile", parameters); + XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); + Hashtable respData = (Hashtable)resp.Value; + if (respData != null) + { + if (respData.Contains("returnString")) + { + if (((string)respData["returnString"]).ToUpper() != "TRUE") + { + m_log.Warn("[GRID]: Unable to update user profile, User Server Reported an issue"); + return false; + } + } + else + { + m_log.Warn("[GRID]: Unable to update user profile, UserServer didn't understand me!"); + return false; + } + } + else + { + m_log.Warn("[GRID]: Unable to update user profile, UserServer didn't understand me!"); + return false; + } + return true; + } + #region IUserServices Friend Methods /// /// Adds a new friend to the database for XUser -- cgit v1.1