From 86e8a56fe1ac6913a11160519ddd66f648756241 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 18 Feb 2012 00:32:09 -0500 Subject: Propagate our teleport flags on logins --- OpenSim/Region/Framework/Scenes/Scene.cs | 5 ++++- OpenSim/Services/HypergridService/GatekeeperService.cs | 8 ++++++-- OpenSim/Services/LLLoginService/LLLoginService.cs | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ecc553d..841be96 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3261,6 +3261,9 @@ namespace OpenSim.Region.Framework.Scenes { bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); + bool viahome = ((teleportFlags & (uint)Constants.TeleportFlags.ViaHome) != 0); + bool godlike = ((teleportFlags & (uint)Constants.TeleportFlags.Godlike) != 0); + reason = String.Empty; //Teleport flags: @@ -3429,7 +3432,7 @@ namespace OpenSim.Region.Framework.Scenes } // Honor Estate teleport routing via Telehubs - if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && RegionInfo.EstateSettings.AllowDirectTeleport == false) + if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && RegionInfo.EstateSettings.AllowDirectTeleport == false && !viahome && !godlike) { SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); // Can have multiple SpawnPoints diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 5d99c79..0a59f86 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -188,9 +188,9 @@ namespace OpenSim.Services.HypergridService string authURL = string.Empty; if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) authURL = aCircuit.ServiceURLs["HomeURI"].ToString(); - m_log.InfoFormat("[GATEKEEPER SERVICE]: Login request for {0} {1} @ {2} ({3}) at {4} using viewer {5}, channel {6}, IP {7}, Mac {8}, Id0 {9}", + m_log.InfoFormat("[GATEKEEPER SERVICE]: Login request for {0} {1} @ {2} ({3}) at {4} using viewer {5}, channel {6}, IP {7}, Mac {8}, Id0 {9} Teleport Flags {10}", aCircuit.firstname, aCircuit.lastname, authURL, aCircuit.AgentID, destination.RegionName, - aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0); + aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0, aCircuit.teleportFlags.ToString()); // // Check client @@ -315,6 +315,10 @@ namespace OpenSim.Services.HypergridService // Finally launch the agent at the destination // Constants.TeleportFlags loginFlag = isFirstLogin ? Constants.TeleportFlags.ViaLogin : Constants.TeleportFlags.ViaHGLogin; + + // Preserve our TeleportFlags we have gathered so-far + loginFlag |= (Constants.TeleportFlags) aCircuit.teleportFlags; + m_log.DebugFormat("[GATEKEEPER SERVICE]: launching agent {0}", loginFlag); return m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason); } diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 02b5cc1..5dff512 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -465,6 +465,7 @@ namespace OpenSim.Services.LLLoginService position = pinfo.HomePosition; lookAt = pinfo.HomeLookAt; + flags |= TeleportFlags.ViaHome; } if (tryDefaults) @@ -753,6 +754,7 @@ namespace OpenSim.Services.LLLoginService { circuitCode = (uint)Util.RandomClass.Next(); ; aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0); + aCircuit.teleportFlags |= (uint)flags; success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason); if (!success && m_GridService != null) { -- cgit v1.1