diff --git a/OpenSim/Data/IRegionData.cs b/OpenSim/Data/IRegionData.cs index c8e38a49ce..d67b5fa0a6 100644 --- a/OpenSim/Data/IRegionData.cs +++ b/OpenSim/Data/IRegionData.cs @@ -71,6 +71,10 @@ namespace OpenSim.Data { RegionData Get(UUID regionID, UUID ScopeID); List Get(string regionName, UUID ScopeID); + + //BA MOD.... + RegionData GetSpecific(string regionName, UUID ScopeID); + RegionData Get(int x, int y, UUID ScopeID); List Get(int xStart, int yStart, int xEnd, int yEnd, UUID ScopeID); diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 46df421352..12064a3b2a 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -81,7 +81,30 @@ namespace OpenSim.Data.MySQL } } - public RegionData Get(int posX, int posY, UUID scopeID) + //BA MOD.... + public RegionData GetSpecific(string regionName, UUID scopeID) + { + string command = "select * from `" + m_Realm + "` where regionName = ?regionName"; + if (scopeID != UUID.Zero) + command += " and ScopeID = ?scopeID"; + + //command += " order by regionName"; + + using (MySqlCommand cmd = new MySqlCommand(command)) + { + cmd.Parameters.AddWithValue("?regionName", regionName); + cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); + + List ret = RunCommand(cmd); + if (ret.Count == 0) + return null; + + return ret[0]; + } + + } + + public RegionData Get(int posX, int posY, UUID scopeID) { /* fixed size regions string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY"; diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index 595db2f02a..a4385fe08c 100644 --- a/OpenSim/Data/Null/NullRegionData.cs +++ b/OpenSim/Data/Null/NullRegionData.cs @@ -166,7 +166,13 @@ namespace OpenSim.Data.Null return null; } - public List Get(int startX, int startY, int endX, int endY, UUID scopeID) + //BA MOD... + public RegionData GetSpecific(string regionName, UUID ScopeID) + { + return null; + } + + public List Get(int startX, int startY, int endX, int endY, UUID scopeID) { if (m_useStaticInstance && Instance != this) return Instance.Get(startX, startY, endX, endY, scopeID); diff --git a/OpenSim/Data/PGSQL/PGSQLRegionData.cs b/OpenSim/Data/PGSQL/PGSQLRegionData.cs index 1272e37d96..a5d22665c1 100644 --- a/OpenSim/Data/PGSQL/PGSQLRegionData.cs +++ b/OpenSim/Data/PGSQL/PGSQLRegionData.cs @@ -114,6 +114,12 @@ namespace OpenSim.Data.PGSQL } } + //BA MOD... + public RegionData GetSpecific(string regionName, UUID ScopeID) + { + return null; + } + public RegionData Get(int posX, int posY, UUID scopeID) { // extend database search for maximum region size area diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index d220568d2f..4afd0ac838 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs @@ -240,6 +240,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return rinfo; } + public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName) + { + + return null; + } + public GridRegion GetRegionByName(UUID scopeID, string regionName) { bool inCache = false; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index d31c7adfee..5359e284b1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs @@ -236,6 +236,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return rinfo; } + public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName) + { + + return null; + } + public GridRegion GetRegionByName(UUID scopeID, string name) { GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, name); diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs index ded7806af8..e8637188c8 100644 --- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs @@ -330,6 +330,12 @@ namespace OpenSim.Services.Connectors return rinfo; } + public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName) + { + + return null; + } + public GridRegion GetRegionByName(UUID scopeID, string regionName) { Dictionary sendData = new Dictionary(); diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index f8eebbe4ee..04de4d7bdf 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -100,6 +100,8 @@ namespace OpenSim.Services.Connectors.SimianGrid #region IGridService + + public string RegisterRegion(UUID scopeID, GridRegion regionInfo) { IPEndPoint ext = regionInfo.ExternalEndPoint; @@ -245,6 +247,12 @@ namespace OpenSim.Services.Connectors.SimianGrid } } + public GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName) + { + + return null; + } + public GridRegion GetRegionByName(UUID scopeID, string regionName) { List regions = GetRegionsByName(scopeID, regionName, 1); diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 40893a9d65..b672e8ce63 100755 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -490,7 +490,18 @@ namespace OpenSim.Services.GridService return null; } - public List GetRegionsByName(UUID scopeID, string name, int maxNumber) + //BA MOD.... + public GridRegion GetRegionByNameSpecific(UUID scopeID, string name) + { + RegionData rdata = m_Database.GetSpecific(name, scopeID); + if (rdata != null) + { + return RegionData2RegionInfo(rdata); + } + return null; + } + + public List GetRegionsByName(UUID scopeID, string name, int maxNumber) { // m_log.DebugFormat("[GRID SERVICE]: GetRegionsByName {0}", name); diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index ead5d3c1ae..f832d1dd2b 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -84,6 +84,10 @@ namespace OpenSim.Services.Interfaces /// Returns the region information if the name matched. Null otherwise. GridRegion GetRegionByName(UUID scopeID, string regionName); + + //BA MOD..... + GridRegion GetRegionByNameSpecific(UUID scopeID, string regionName); + /// /// Get information about regions starting with the provided name. ///