do not do chained hg teleports

This commit is contained in:
UbitUmarov
2024-03-31 00:44:50 +00:00
parent 723a528b58
commit 0d1b14c78f
7 changed files with 62 additions and 13 deletions

View File

@@ -546,7 +546,7 @@ namespace OpenSim.Services.GridService
if (localGrid)
{
if(uri.HasRegionName)
if (uri.HasRegionName)
{
RegionData rdata = m_Database.GetSpecific(uri.RegionName, scopeID);
if (rdata != null)
@@ -583,6 +583,40 @@ namespace OpenSim.Services.GridService
return r;
}
public GridRegion GetLocalRegionByName(UUID scopeID, string name)
{
var nameURI = new RegionURI(name);
return GetLocalRegionByURI(scopeID, nameURI);
}
public GridRegion GetLocalRegionByURI(UUID scopeID, RegionURI uri)
{
if (!uri.IsValid)
return null;
if (uri.HasHost)
{
if (!uri.ResolveDNS())
return null;
if(!m_HypergridLinker.IsLocalGrid(uri.HostUrl))
return null;
}
if (uri.HasRegionName)
{
RegionData rdata = m_Database.GetSpecific(uri.RegionName, scopeID);
if (rdata != null)
return RegionData2RegionInfo(rdata);
}
else
{
List<GridRegion> defregs = GetDefaultRegions(scopeID);
if (defregs != null)
return defregs[0];
}
return null;
}
public List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
{
// m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name);