aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBlueWall2012-02-18 00:32:09 -0500
committerBlueWall2012-02-18 00:32:09 -0500
commit7bdcf9eb26842af57e31f3cecd4f403a39a27bc0 (patch)
tree1b09fefccc8fde9afb3bbc052358ef3a6ffbdefb
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-7bdcf9eb26842af57e31f3cecd4f403a39a27bc0.zip
opensim-SC_OLD-7bdcf9eb26842af57e31f3cecd4f403a39a27bc0.tar.gz
opensim-SC_OLD-7bdcf9eb26842af57e31f3cecd4f403a39a27bc0.tar.bz2
opensim-SC_OLD-7bdcf9eb26842af57e31f3cecd4f403a39a27bc0.tar.xz
Propagate our teleport flags on logins
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs8
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs2
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
3261 { 3261 {
3262 bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || 3262 bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 ||
3263 (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); 3263 (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0);
3264 bool viahome = ((teleportFlags & (uint)Constants.TeleportFlags.ViaHome) != 0);
3265 bool godlike = ((teleportFlags & (uint)Constants.TeleportFlags.Godlike) != 0);
3266
3264 reason = String.Empty; 3267 reason = String.Empty;
3265 3268
3266 //Teleport flags: 3269 //Teleport flags:
@@ -3429,7 +3432,7 @@ namespace OpenSim.Region.Framework.Scenes
3429 } 3432 }
3430 3433
3431 // Honor Estate teleport routing via Telehubs 3434 // Honor Estate teleport routing via Telehubs
3432 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && RegionInfo.EstateSettings.AllowDirectTeleport == false) 3435 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && RegionInfo.EstateSettings.AllowDirectTeleport == false && !viahome && !godlike)
3433 { 3436 {
3434 SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); 3437 SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject);
3435 // Can have multiple SpawnPoints 3438 // 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
188 string authURL = string.Empty; 188 string authURL = string.Empty;
189 if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) 189 if (aCircuit.ServiceURLs.ContainsKey("HomeURI"))
190 authURL = aCircuit.ServiceURLs["HomeURI"].ToString(); 190 authURL = aCircuit.ServiceURLs["HomeURI"].ToString();
191 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}", 191 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}",
192 aCircuit.firstname, aCircuit.lastname, authURL, aCircuit.AgentID, destination.RegionName, 192 aCircuit.firstname, aCircuit.lastname, authURL, aCircuit.AgentID, destination.RegionName,
193 aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0); 193 aCircuit.Viewer, aCircuit.Channel, aCircuit.IPAddress, aCircuit.Mac, aCircuit.Id0, aCircuit.teleportFlags.ToString());
194 194
195 // 195 //
196 // Check client 196 // Check client
@@ -315,6 +315,10 @@ namespace OpenSim.Services.HypergridService
315 // Finally launch the agent at the destination 315 // Finally launch the agent at the destination
316 // 316 //
317 Constants.TeleportFlags loginFlag = isFirstLogin ? Constants.TeleportFlags.ViaLogin : Constants.TeleportFlags.ViaHGLogin; 317 Constants.TeleportFlags loginFlag = isFirstLogin ? Constants.TeleportFlags.ViaLogin : Constants.TeleportFlags.ViaHGLogin;
318
319 // Preserve our TeleportFlags we have gathered so-far
320 loginFlag |= (Constants.TeleportFlags) aCircuit.teleportFlags;
321
318 m_log.DebugFormat("[GATEKEEPER SERVICE]: launching agent {0}", loginFlag); 322 m_log.DebugFormat("[GATEKEEPER SERVICE]: launching agent {0}", loginFlag);
319 return m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason); 323 return m_SimulationService.CreateAgent(destination, aCircuit, (uint)loginFlag, out reason);
320 } 324 }
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
465 465
466 position = pinfo.HomePosition; 466 position = pinfo.HomePosition;
467 lookAt = pinfo.HomeLookAt; 467 lookAt = pinfo.HomeLookAt;
468 flags |= TeleportFlags.ViaHome;
468 } 469 }
469 470
470 if (tryDefaults) 471 if (tryDefaults)
@@ -753,6 +754,7 @@ namespace OpenSim.Services.LLLoginService
753 { 754 {
754 circuitCode = (uint)Util.RandomClass.Next(); ; 755 circuitCode = (uint)Util.RandomClass.Next(); ;
755 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0); 756 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
757 aCircuit.teleportFlags |= (uint)flags;
756 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason); 758 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason);
757 if (!success && m_GridService != null) 759 if (!success && m_GridService != null)
758 { 760 {