aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
diff options
context:
space:
mode:
authorMelanie2012-01-05 08:15:33 +0000
committerMelanie2012-01-05 08:15:33 +0000
commit1ebc9d04aa33e18e22ee2f03465bc5950c3544ce (patch)
tree3e7e39255ad455b59434979d47db7da243ac3dd6 /OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
parentMerge branch 'master' into careminster (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-1ebc9d04aa33e18e22ee2f03465bc5950c3544ce.zip
opensim-SC-1ebc9d04aa33e18e22ee2f03465bc5950c3544ce.tar.gz
opensim-SC-1ebc9d04aa33e18e22ee2f03465bc5950c3544ce.tar.bz2
opensim-SC-1ebc9d04aa33e18e22ee2f03465bc5950c3544ce.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs')
-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 a73bf9e..d617aee 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -559,6 +559,60 @@ namespace OpenSim.Services.Connectors.Hypergrid
559 return online; 559 return online;
560 } 560 }
561 561
562 public Dictionary<string,object> GetUserInfo (UUID userID)
563 {
564 Hashtable hash = new Hashtable();
565 hash["userID"] = userID.ToString();
566
567 IList paramList = new ArrayList();
568 paramList.Add(hash);
569
570 XmlRpcRequest request = new XmlRpcRequest("get_user_info", paramList);
571
572 Dictionary<string, object> info = new Dictionary<string, object>();
573 XmlRpcResponse response = null;
574 try
575 {
576 response = request.Send(m_ServerURL, 10000);
577 }
578 catch
579 {
580 m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetUserInfo", m_ServerURL);
581 return info;
582 }
583
584 if (response.IsFault)
585 {
586 m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetServerURLs returned an error: {1}", m_ServerURL, response.FaultString);
587 return info;
588 }
589
590 hash = (Hashtable)response.Value;
591 try
592 {
593 if (hash == null)
594 {
595 m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetUserInfo Got null response from {0}! THIS IS BAAAAD", m_ServerURL);
596 return info;
597 }
598
599 // Here is the actual response
600 foreach (object key in hash.Keys)
601 {
602 if (hash[key] != null)
603 {
604 info.Add(key.ToString(), hash[key]);
605 }
606 }
607 }
608 catch
609 {
610 m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetOnlineFriends response.");
611 }
612
613 return info;
614 }
615
562 public Dictionary<string, object> GetServerURLs(UUID userID) 616 public Dictionary<string, object> GetServerURLs(UUID userID)
563 { 617 {
564 Hashtable hash = new Hashtable(); 618 Hashtable hash = new Hashtable();