From 6974596e83b9029b30913e8e0ed71cbe1da46358 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 29 Dec 2011 12:34:57 -0800 Subject: Fixed mix-up in UserAccount fields when passing UserAccounts remotely. --- OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs index ab383ef..3fd69ae 100644 --- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs +++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs @@ -231,7 +231,7 @@ namespace OpenSim.Server.Handlers.UserAccounts int userLevel = 0; if (request.ContainsKey("UserLevel") && int.TryParse(request["UserLevel"].ToString(), out userLevel)) - existingAccount.UserFlags = userLevel; + existingAccount.UserLevel = userLevel; int userFlags = 0; if (request.ContainsKey("UserFlags") && int.TryParse(request["UserFlags"].ToString(), out userFlags)) -- cgit v1.1 From 6941058824e418bcdc2932c35f226bbcc5cea2ad Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 1 Jan 2012 14:57:13 -0500 Subject: Profile Updates Update basic profile to use the replaceable interface, making configuration less error-prone. Add support to query avatar's home user account and profile service for regions usng the updated OpenProfileModule with Hypergrid. --- .../Handlers/Hypergrid/UserAgentServerConnector.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs index 07c6962..1bd3706 100644 --- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs @@ -91,6 +91,7 @@ namespace OpenSim.Server.Handlers.Hypergrid server.AddXmlRPCHandler("status_notification", StatusNotification, false); server.AddXmlRPCHandler("get_online_friends", GetOnlineFriends, false); + server.AddXmlRPCHandler("get_user_info", GetUserInfo, false); server.AddXmlRPCHandler("get_server_urls", GetServerURLs, false); server.AddXmlRPCHandler("locate_user", LocateUser, false); @@ -299,6 +300,38 @@ namespace OpenSim.Server.Handlers.Hypergrid } + public XmlRpcResponse GetUserInfo(XmlRpcRequest request, IPEndPoint remoteClient) + { + Hashtable hash = new Hashtable(); + Hashtable requestData = (Hashtable)request.Params[0]; + + // This needs checking! + if (requestData.ContainsKey("userID")) + { + string userID_str = (string)requestData["userID"]; + UUID userID = UUID.Zero; + UUID.TryParse(userID_str, out userID); + + //int userFlags = m_HomeUsersService.GetUserFlags(userID); + Dictionary userInfo = m_HomeUsersService.GetUserInfo(userID); + if (userInfo.Count > 0) + { + foreach (KeyValuePair kvp in userInfo) + { + hash[kvp.Key] = kvp.Value; + } + } + else + { + hash["result"] = "failure"; + } + } + + XmlRpcResponse response = new XmlRpcResponse(); + response.Value = hash; + return response; + } + public XmlRpcResponse GetServerURLs(XmlRpcRequest request, IPEndPoint remoteClient) { Hashtable hash = new Hashtable(); -- cgit v1.1