From c5f7184d1ba8c608574dae6d8a2af3aceff61417 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 15 Jun 2014 16:29:25 -0700 Subject: [PATCH] Behavior change: only local users can set home in any parcel of a grid. Setting it for foreign users does not make sense, since cntrl+shift+H always teleports them back to their original grid. --- .../World/Land/LandManagementModule.cs | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index ddea5b070c..0276b63d78 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -1985,15 +1985,17 @@ namespace OpenSim.Region.CoreModules.World.Land telehub = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject); // Can the user set home here? - if (// (a) gods and land managers can set home - m_scene.Permissions.IsAdministrator(remoteClient.AgentId) || - m_scene.Permissions.IsGod(remoteClient.AgentId) || - // (b) land owners can set home - remoteClient.AgentId == land.LandData.OwnerID || - // (c) members of the land-associated group in roles that can set home - ((gpowers & (ulong)GroupPowers.AllowSetHome) == (ulong)GroupPowers.AllowSetHome) || - // (d) parcels with telehubs can be the home of anyone - (telehub != null && land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y))) + if (// Required: local user; foreign users cannot set home + m_scene.UserManagementModule.IsLocalGridUser(remoteClient.AgentId) && + (// (a) gods and land managers can set home + m_scene.Permissions.IsAdministrator(remoteClient.AgentId) || + m_scene.Permissions.IsGod(remoteClient.AgentId) || + // (b) land owners can set home + remoteClient.AgentId == land.LandData.OwnerID || + // (c) members of the land-associated group in roles that can set home + ((gpowers & (ulong)GroupPowers.AllowSetHome) == (ulong)GroupPowers.AllowSetHome) || + // (d) parcels with telehubs can be the home of anyone + (telehub != null && land.ContainsPoint((int)telehub.AbsolutePosition.X, (int)telehub.AbsolutePosition.Y)))) { if (m_scene.GridUserService.SetHome(remoteClient.AgentId.ToString(), land.RegionUUID, position, lookAt)) // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.