diff options
author | Diva Canto | 2012-04-24 22:17:10 -0700 |
---|---|---|
committer | Diva Canto | 2012-04-24 22:17:10 -0700 |
commit | cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a (patch) | |
tree | b04510fc672510514fd15808dc456b467bc64092 /OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |
parent | refactor: Combine ScenePresence.Teleport() and TeleportWithMomentum() (diff) | |
download | opensim-SC_OLD-cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a.zip opensim-SC_OLD-cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a.tar.gz opensim-SC_OLD-cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a.tar.bz2 opensim-SC_OLD-cf1c34605bf58ee783c2a7d0c63f51ecf6d3288a.tar.xz |
HG: Moved User-level code down to the HGEntityTransferModule where it belongs.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 7f9175d..6a92e61 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -50,6 +50,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
51 | 51 | ||
52 | private bool m_Initialized = false; | 52 | private bool m_Initialized = false; |
53 | private int m_levelHGTeleport = 0; | ||
53 | 54 | ||
54 | private GatekeeperServiceConnector m_GatekeeperConnector; | 55 | private GatekeeperServiceConnector m_GatekeeperConnector; |
55 | 56 | ||
@@ -68,6 +69,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
68 | string name = moduleConfig.GetString("EntityTransferModule", ""); | 69 | string name = moduleConfig.GetString("EntityTransferModule", ""); |
69 | if (name == Name) | 70 | if (name == Name) |
70 | { | 71 | { |
72 | IConfig transferConfig = source.Configs["EntityTransfer"]; | ||
73 | if (transferConfig != null) | ||
74 | m_levelHGTeleport = transferConfig.GetInt("LevelHGTeleport", 0); | ||
75 | |||
71 | InitialiseCommon(source); | 76 | InitialiseCommon(source); |
72 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | 77 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); |
73 | } | 78 | } |
@@ -164,6 +169,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
164 | if (flags == -1 /* no region in DB */ || (flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) | 169 | if (flags == -1 /* no region in DB */ || (flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) |
165 | { | 170 | { |
166 | // this user is going to another grid | 171 | // this user is going to another grid |
172 | // check if HyperGrid teleport is allowed, based on user level | ||
173 | if (sp.UserLevel < m_levelHGTeleport) | ||
174 | { | ||
175 | m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination link is non permitted hypergrid region. Unable to teleport agent."); | ||
176 | reason = "HyperGrid teleport not permitted"; | ||
177 | return false; | ||
178 | } | ||
179 | |||
167 | if (agentCircuit.ServiceURLs.ContainsKey("HomeURI")) | 180 | if (agentCircuit.ServiceURLs.ContainsKey("HomeURI")) |
168 | { | 181 | { |
169 | string userAgentDriver = agentCircuit.ServiceURLs["HomeURI"].ToString(); | 182 | string userAgentDriver = agentCircuit.ServiceURLs["HomeURI"].ToString(); |