aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Hypergrid
diff options
context:
space:
mode:
authorDiva Canto2010-01-18 10:37:11 -0800
committerDiva Canto2010-01-18 10:37:11 -0800
commitfd64823466ee667d0d827f95d3001ec8675512b2 (patch)
tree8b5b695da9283a693c29d9d1614e12cfeeaa8d5a /OpenSim/Server/Handlers/Hypergrid
parent* Fixed misspelling of field in GridService (diff)
downloadopensim-SC_OLD-fd64823466ee667d0d827f95d3001ec8675512b2.zip
opensim-SC_OLD-fd64823466ee667d0d827f95d3001ec8675512b2.tar.gz
opensim-SC_OLD-fd64823466ee667d0d827f95d3001ec8675512b2.tar.bz2
opensim-SC_OLD-fd64823466ee667d0d827f95d3001ec8675512b2.tar.xz
* Added missing GatekeeperServiceConnector
* Added basic machinery for teleporting users home. Untested.
Diffstat (limited to 'OpenSim/Server/Handlers/Hypergrid')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs1
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs33
2 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
index c56ea3f..f03d33a 100644
--- a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
@@ -63,6 +63,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
63 HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService); 63 HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService);
64 server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false); 64 server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false);
65 server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false); 65 server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false);
66 server.AddXmlRPCHandler("get_home_region", hghandlers.GetHomeRegion, false);
66 67
67 server.AddHTTPHandler("/foreignagent/", new AgentHandler(m_GatekeeperService).Handler); 68 server.AddHTTPHandler("/foreignagent/", new AgentHandler(m_GatekeeperService).Handler);
68 69
diff --git a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs
index baafd7d..846d1c2 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs
@@ -111,5 +111,38 @@ namespace OpenSim.Server.Handlers.Hypergrid
111 111
112 } 112 }
113 113
114 public XmlRpcResponse GetHomeRegion(XmlRpcRequest request, IPEndPoint remoteClient)
115 {
116 Hashtable requestData = (Hashtable)request.Params[0];
117 //string host = (string)requestData["host"];
118 //string portstr = (string)requestData["port"];
119 string userID_str = (string)requestData["userID"];
120 UUID userID = UUID.Zero;
121 UUID.TryParse(userID_str, out userID);
122
123 Vector3 position = Vector3.UnitY, lookAt = Vector3.UnitY;
124 GridRegion regInfo = m_GatekeeperService.GetHomeRegion(userID, out position, out lookAt);
125
126 Hashtable hash = new Hashtable();
127 if (regInfo == null)
128 hash["result"] = "false";
129 else
130 {
131 hash["result"] = "true";
132 hash["uuid"] = regInfo.RegionID.ToString();
133 hash["x"] = regInfo.RegionLocX.ToString();
134 hash["y"] = regInfo.RegionLocY.ToString();
135 hash["region_name"] = regInfo.RegionName;
136 hash["hostname"] = regInfo.ExternalHostName;
137 hash["http_port"] = regInfo.HttpPort.ToString();
138 hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString();
139 hash["position"] = position.ToString();
140 hash["lookAt"] = lookAt.ToString();
141 }
142 XmlRpcResponse response = new XmlRpcResponse();
143 response.Value = hash;
144 return response;
145
146 }
114 } 147 }
115} 148}