diff options
author | Snoopy Pfeffer | 2012-03-27 22:09:58 +0200 |
---|---|---|
committer | Snoopy Pfeffer | 2012-03-27 22:09:58 +0200 |
commit | 7223b63563f28f6fe8044bdabcd1b9900d28c54a (patch) | |
tree | 7bf1df67f9a1388b940b386e64e239f52f986a4b /OpenSim/Region/CoreModules/Framework | |
parent | HG: beginning of a more restrictive inventory access procedure (optional). Ex... (diff) | |
download | opensim-SC-7223b63563f28f6fe8044bdabcd1b9900d28c54a.zip opensim-SC-7223b63563f28f6fe8044bdabcd1b9900d28c54a.tar.gz opensim-SC-7223b63563f28f6fe8044bdabcd1b9900d28c54a.tar.bz2 opensim-SC-7223b63563f28f6fe8044bdabcd1b9900d28c54a.tar.xz |
User level based restrictions for HyperGrid teleports, asset uploads, group creations and getting contacted from other grids. Incoming HyperGrid teleports can also be restricted to local users.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 2d73594..427a49d 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -60,6 +60,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
60 | set { m_MaxTransferDistance = value; } | 60 | set { m_MaxTransferDistance = value; } |
61 | } | 61 | } |
62 | 62 | ||
63 | private int m_levelHGTeleport = 0; | ||
64 | |||
63 | protected bool m_Enabled = false; | 65 | protected bool m_Enabled = false; |
64 | protected Scene m_aScene; | 66 | protected Scene m_aScene; |
65 | protected List<Scene> m_Scenes = new List<Scene>(); | 67 | protected List<Scene> m_Scenes = new List<Scene>(); |
@@ -101,7 +103,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
101 | { | 103 | { |
102 | IConfig transferConfig = source.Configs["EntityTransfer"]; | 104 | IConfig transferConfig = source.Configs["EntityTransfer"]; |
103 | if (transferConfig != null) | 105 | if (transferConfig != null) |
106 | { | ||
104 | MaxTransferDistance = transferConfig.GetInt("max_distance", 4095); | 107 | MaxTransferDistance = transferConfig.GetInt("max_distance", 4095); |
108 | m_levelHGTeleport = transferConfig.GetInt("LevelHGTeleport", 0); | ||
109 | } | ||
105 | 110 | ||
106 | m_agentsInTransit = new List<UUID>(); | 111 | m_agentsInTransit = new List<UUID>(); |
107 | m_Enabled = true; | 112 | m_Enabled = true; |
@@ -227,6 +232,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
227 | return; | 232 | return; |
228 | } | 233 | } |
229 | 234 | ||
235 | // check if HyperGrid teleport is allowed, based on user level | ||
236 | int flags = m_aScene.GridService.GetRegionFlags(sp.Scene.RegionInfo.ScopeID, reg.RegionID); | ||
237 | |||
238 | if (((flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) && (sp.UserLevel < m_levelHGTeleport)) | ||
239 | { | ||
240 | m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination link is non permitted hypergrid region. Unable to teleport agent."); | ||
241 | sp.ControllingClient.SendTeleportFailed("HyperGrid teleport not permitted"); | ||
242 | return; | ||
243 | } | ||
244 | |||
230 | uint curX = 0, curY = 0; | 245 | uint curX = 0, curY = 0; |
231 | Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY); | 246 | Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY); |
232 | int curCellX = (int)(curX / Constants.RegionSize); | 247 | int curCellX = (int)(curX / Constants.RegionSize); |