mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
add gridservice GetOnlineRegions()
This commit is contained in:
@@ -86,6 +86,7 @@ namespace OpenSim.Data
|
||||
List<RegionData> GetDefaultHypergridRegions(UUID scopeID);
|
||||
List<RegionData> GetFallbackRegions(UUID scopeID);
|
||||
List<RegionData> GetHyperlinks(UUID scopeID);
|
||||
List<RegionData> GetOnlineRegions(UUID scopeID);
|
||||
}
|
||||
|
||||
public class RegionDataDistanceCompare : IComparer<RegionData>
|
||||
|
||||
@@ -402,6 +402,11 @@ namespace OpenSim.Data.MySQL
|
||||
return Get((int)RegionFlags.Hyperlink, scopeID);
|
||||
}
|
||||
|
||||
public List<RegionData> GetOnlineRegions(UUID scopeID)
|
||||
{
|
||||
return Get((int)RegionFlags.RegionOnline, scopeID);
|
||||
}
|
||||
|
||||
private List<RegionData> Get(int regionFlags, UUID scopeID)
|
||||
{
|
||||
string command = "select * from `" + m_Realm + "` where (flags & " + regionFlags.ToString() + ") <> 0";
|
||||
|
||||
@@ -273,6 +273,11 @@ namespace OpenSim.Data.Null
|
||||
return Get((int)RegionFlags.Hyperlink, scopeID);
|
||||
}
|
||||
|
||||
public List<RegionData> GetOnlineRegions(UUID scopeID)
|
||||
{
|
||||
return Get((int)RegionFlags.RegionOnline, scopeID);
|
||||
}
|
||||
|
||||
private List<RegionData> Get(int regionFlags, UUID scopeID)
|
||||
{
|
||||
if (Instance != this)
|
||||
|
||||
@@ -431,6 +431,11 @@ namespace OpenSim.Data.PGSQL
|
||||
return Get((int)RegionFlags.Hyperlink, scopeID);
|
||||
}
|
||||
|
||||
public List<RegionData> GetOnlineRegions(UUID scopeID)
|
||||
{
|
||||
return Get((int)RegionFlags.RegionOnline, scopeID);
|
||||
}
|
||||
|
||||
private List<RegionData> Get(int regionFlags, UUID scopeID)
|
||||
{
|
||||
string sql = "SELECT * FROM " + m_Realm + " WHERE (\"flags\" & " + regionFlags.ToString() + ") <> 0";
|
||||
|
||||
Reference in New Issue
Block a user