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. --- .../Hypergrid/UserAgentServiceConnector.cs | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 57b6d16..5b27cf6 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs @@ -561,6 +561,60 @@ namespace OpenSim.Services.Connectors.Hypergrid return online; } + public Dictionary GetUserInfo (UUID userID) + { + Hashtable hash = new Hashtable(); + hash["userID"] = userID.ToString(); + + IList paramList = new ArrayList(); + paramList.Add(hash); + + XmlRpcRequest request = new XmlRpcRequest("get_user_info", paramList); + + Dictionary info = new Dictionary(); + XmlRpcResponse response = null; + try + { + response = request.Send(m_ServerURL, 10000); + } + catch + { + m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetUserInfo", m_ServerURL); + return info; + } + + if (response.IsFault) + { + m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetServerURLs returned an error: {1}", m_ServerURL, response.FaultString); + return info; + } + + hash = (Hashtable)response.Value; + try + { + if (hash == null) + { + m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetUserInfo Got null response from {0}! THIS IS BAAAAD", m_ServerURL); + return info; + } + + // Here is the actual response + foreach (object key in hash.Keys) + { + if (hash[key] != null) + { + info.Add(key.ToString(), hash[key]); + } + } + } + catch + { + m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response."); + } + + return info; + } + public Dictionary GetServerURLs(UUID userID) { Hashtable hash = new Hashtable(); -- cgit v1.1