diff options
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r-- | OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs | 1 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs | 33 |
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 | } |