diff options
author | Diva Canto | 2010-01-18 10:37:11 -0800 |
---|---|---|
committer | Diva Canto | 2010-01-18 10:37:11 -0800 |
commit | fd64823466ee667d0d827f95d3001ec8675512b2 (patch) | |
tree | 8b5b695da9283a693c29d9d1614e12cfeeaa8d5a /OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs | |
parent | * Fixed misspelling of field in GridService (diff) | |
download | opensim-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 '')
-rw-r--r-- | OpenSim/Server/Handlers/Hypergrid/HypergridHandlers.cs | 33 |
1 files changed, 33 insertions, 0 deletions
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 | } |