diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index e354522..fa05c90 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -225,19 +225,20 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
225 | 225 | ||
226 | #region HG overrides of IEntiryTransferModule | 226 | #region HG overrides of IEntiryTransferModule |
227 | 227 | ||
228 | protected override GridRegion GetFinalDestination(GridRegion region) | 228 | protected override GridRegion GetFinalDestination(GridRegion region, out string message) |
229 | { | 229 | { |
230 | int flags = Scene.GridService.GetRegionFlags(Scene.RegionInfo.ScopeID, region.RegionID); | 230 | int flags = Scene.GridService.GetRegionFlags(Scene.RegionInfo.ScopeID, region.RegionID); |
231 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: region {0} flags: {1}", region.RegionName, flags); | 231 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: region {0} flags: {1}", region.RegionName, flags); |
232 | message = null; | ||
232 | 233 | ||
233 | if ((flags & (int)OpenSim.Framework.RegionFlags.Hyperlink) != 0) | 234 | if ((flags & (int)OpenSim.Framework.RegionFlags.Hyperlink) != 0) |
234 | { | 235 | { |
235 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region is hyperlink"); | 236 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region is hyperlink"); |
236 | GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID); | 237 | GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID, out message); |
237 | if (real_destination != null) | 238 | if (real_destination != null) |
238 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI); | 239 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination: ServerURI={0}", real_destination.ServerURI); |
239 | else | 240 | else |
240 | m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: GetHyperlinkRegion to Gatekeeper {0} failed", region.ServerURI); | 241 | m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: GetHyperlinkRegion of region {0} from Gatekeeper {1} failed: {2}", region.RegionID, region.ServerURI, message); |
241 | return real_destination; | 242 | return real_destination; |
242 | } | 243 | } |
243 | 244 | ||
@@ -533,7 +534,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
533 | GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); | 534 | GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); |
534 | GridRegion gatekeeper = new GridRegion(); | 535 | GridRegion gatekeeper = new GridRegion(); |
535 | gatekeeper.ServerURI = lm.Gatekeeper; | 536 | gatekeeper.ServerURI = lm.Gatekeeper; |
536 | GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(lm.RegionID)); | 537 | string message; |
538 | GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(lm.RegionID), out message); | ||
537 | 539 | ||
538 | if (finalDestination != null) | 540 | if (finalDestination != null) |
539 | { | 541 | { |
@@ -541,9 +543,19 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
541 | IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>(); | 543 | IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>(); |
542 | 544 | ||
543 | if (transferMod != null && sp != null) | 545 | if (transferMod != null && sp != null) |
546 | { | ||
547 | if (message != null) | ||
548 | sp.ControllingClient.SendAgentAlertMessage(message, true); | ||
549 | |||
544 | transferMod.DoTeleport( | 550 | transferMod.DoTeleport( |
545 | sp, gatekeeper, finalDestination, lm.Position, Vector3.UnitX, | 551 | sp, gatekeeper, finalDestination, lm.Position, Vector3.UnitX, |
546 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); | 552 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); |
553 | } | ||
554 | } | ||
555 | else | ||
556 | { | ||
557 | remoteClient.SendTeleportFailed(message); | ||
558 | return; | ||
547 | } | 559 | } |
548 | 560 | ||
549 | } | 561 | } |