aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Hypergrid
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs54
1 files changed, 54 insertions, 0 deletions
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
561 return online; 561 return online;
562 } 562 }
563 563
564 public Dictionary<string,object> GetUserInfo (UUID userID)
565 {
566 Hashtable hash = new Hashtable();
567 hash["userID"] = userID.ToString();
568
569 IList paramList = new ArrayList();
570 paramList.Add(hash);
571
572 XmlRpcRequest request = new XmlRpcRequest("get_user_info", paramList);
573
574 Dictionary<string, object> info = new Dictionary<string, object>();
575 XmlRpcResponse response = null;
576 try
577 {
578 response = request.Send(m_ServerURL, 10000);
579 }
580 catch
581 {
582 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetUserInfo", m_ServerURL);
583 return info;
584 }
585
586 if (response.IsFault)
587 {
588 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetServerURLs returned an error: {1}", m_ServerURL, response.FaultString);
589 return info;
590 }
591
592 hash = (Hashtable)response.Value;
593 try
594 {
595 if (hash == null)
596 {
597 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetUserInfo Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
598 return info;
599 }
600
601 // Here is the actual response
602 foreach (object key in hash.Keys)
603 {
604 if (hash[key] != null)
605 {
606 info.Add(key.ToString(), hash[key]);
607 }
608 }
609 }
610 catch
611 {
612 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response.");
613 }
614
615 return info;
616 }
617
564 public Dictionary<string, object> GetServerURLs(UUID userID) 618 public Dictionary<string, object> GetServerURLs(UUID userID)
565 { 619 {
566 Hashtable hash = new Hashtable(); 620 Hashtable hash = new Hashtable();