aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 38a7805..5c7ca22 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
84 84
85 protected override void OnNewClient(IClientAPI client) 85 protected override void OnNewClient(IClientAPI client)
86 { 86 {
87 client.OnTeleportHomeRequest += TeleportHome; 87 client.OnTeleportHomeRequest += TriggerTeleportHome;
88 client.OnTeleportLandmarkRequest += RequestTeleportLandmark; 88 client.OnTeleportLandmarkRequest += RequestTeleportLandmark;
89 client.OnConnectionClosed += new Action<IClientAPI>(OnConnectionClosed); 89 client.OnConnectionClosed += new Action<IClientAPI>(OnConnectionClosed);
90 } 90 }
@@ -182,7 +182,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
182 return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason); 182 return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason);
183 } 183 }
184 184
185 public override void TeleportHome(UUID id, IClientAPI client) 185 public void TriggerTeleportHome(UUID id, IClientAPI client)
186 {
187 TeleportHome(id, client);
188 }
189
190 public override bool TeleportHome(UUID id, IClientAPI client)
186 { 191 {
187 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName); 192 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName);
188 193
@@ -192,8 +197,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
192 { 197 {
193 // local grid user 198 // local grid user
194 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: User is local"); 199 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: User is local");
195 base.TeleportHome(id, client); 200 return base.TeleportHome(id, client);
196 return;
197 } 201 }
198 202
199 // Foreign user wants to go home 203 // Foreign user wants to go home
@@ -203,7 +207,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
203 { 207 {
204 client.SendTeleportFailed("Your information has been lost"); 208 client.SendTeleportFailed("Your information has been lost");
205 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Unable to locate agent's gateway information"); 209 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Unable to locate agent's gateway information");
206 return; 210 return false;
207 } 211 }
208 212
209 IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString()); 213 IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString());
@@ -213,7 +217,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
213 { 217 {
214 client.SendTeleportFailed("Your home region could not be found"); 218 client.SendTeleportFailed("Your home region could not be found");
215 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent's home region not found"); 219 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent's home region not found");
216 return; 220 return false;
217 } 221 }
218 222
219 ScenePresence sp = ((Scene)(client.Scene)).GetScenePresence(client.AgentId); 223 ScenePresence sp = ((Scene)(client.Scene)).GetScenePresence(client.AgentId);
@@ -221,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
221 { 225 {
222 client.SendTeleportFailed("Internal error"); 226 client.SendTeleportFailed("Internal error");
223 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent not found in the scene where it is supposed to be"); 227 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent not found in the scene where it is supposed to be");
224 return; 228 return false;
225 } 229 }
226 230
227 IEventQueue eq = sp.Scene.RequestModuleInterface<IEventQueue>(); 231 IEventQueue eq = sp.Scene.RequestModuleInterface<IEventQueue>();
@@ -231,6 +235,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
231 aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName); 235 aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName);
232 236
233 DoTeleport(sp, homeGatekeeper, finalDestination, position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome), eq); 237 DoTeleport(sp, homeGatekeeper, finalDestination, position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome), eq);
238 return true;
234 } 239 }
235 240
236 /// <summary> 241 /// <summary>