mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 20:55:43 +08:00
Fix mantis #5413. WARNING: new config variable in section [GridService] of the simulators called Gatekeeper -- intended to have the URL of the grid's Gatekeeper service (so that it can be checked against). See ini.examples.
This commit is contained in:
@@ -65,6 +65,7 @@ namespace OpenSim.Services.GridService
|
||||
protected UUID m_ScopeID = UUID.Zero;
|
||||
protected bool m_Check4096 = true;
|
||||
protected string m_MapTileDirectory = string.Empty;
|
||||
protected string m_ThisGatekeeper = string.Empty;
|
||||
|
||||
// Hyperlink regions are hyperlinks on the map
|
||||
public readonly Dictionary<UUID, GridRegion> m_HyperlinkRegions = new Dictionary<UUID, GridRegion>();
|
||||
@@ -123,6 +124,8 @@ namespace OpenSim.Services.GridService
|
||||
|
||||
m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles");
|
||||
|
||||
m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", string.Empty);
|
||||
|
||||
m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
|
||||
|
||||
m_log.Debug("[HYPERGRID LINKER]: Loaded all services...");
|
||||
@@ -266,6 +269,13 @@ namespace OpenSim.Services.GridService
|
||||
regInfo.ScopeID = scopeID;
|
||||
regInfo.EstateOwner = ownerID;
|
||||
|
||||
// Make sure we're not hyperlinking to regions on this grid!
|
||||
if (regInfo.ServerURI.Trim(new char[]{'/', ' '}) == m_ThisGatekeeper.Trim(new char[]{'/', ' '}))
|
||||
{
|
||||
reason = "Cannot hyperlink to regions on the same grid";
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for free coordinates
|
||||
GridRegion region = m_GridService.GetRegionByPosition(regInfo.ScopeID, regInfo.RegionLocX, regInfo.RegionLocY);
|
||||
if (region != null)
|
||||
|
||||
Reference in New Issue
Block a user