diff options
author | Terry | 2019-11-12 11:02:10 -0500 |
---|---|---|
committer | UbitUmarov | 2019-11-14 05:26:54 +0000 |
commit | 2f79f463ea07369f6ec154c67b25705cf1a2a616 (patch) | |
tree | da64db8ae91f5dc6364dfb0f3c2cd1a026432cc2 /OpenSim/Data/MySQL/MySQLRegionData.cs | |
parent | mantis 8627: handle the case constant compareOp constant on Yengine (diff) | |
download | opensim-SC-2f79f463ea07369f6ec154c67b25705cf1a2a616.zip opensim-SC-2f79f463ea07369f6ec154c67b25705cf1a2a616.tar.gz opensim-SC-2f79f463ea07369f6ec154c67b25705cf1a2a616.tar.bz2 opensim-SC-2f79f463ea07369f6ec154c67b25705cf1a2a616.tar.xz |
Attempt to fix the issue where, when logging into the grid, the user supplies a region name, but instead of going to the specific region, they are sent to a region "Like" the one specified.
Signed-off-by: Terry <terry@digiworldz.com>
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLRegionData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 46df421..12064a3 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -81,7 +81,30 @@ namespace OpenSim.Data.MySQL | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | public RegionData Get(int posX, int posY, UUID scopeID) | 84 | //BA MOD.... |
85 | public RegionData GetSpecific(string regionName, UUID scopeID) | ||
86 | { | ||
87 | string command = "select * from `" + m_Realm + "` where regionName = ?regionName"; | ||
88 | if (scopeID != UUID.Zero) | ||
89 | command += " and ScopeID = ?scopeID"; | ||
90 | |||
91 | //command += " order by regionName"; | ||
92 | |||
93 | using (MySqlCommand cmd = new MySqlCommand(command)) | ||
94 | { | ||
95 | cmd.Parameters.AddWithValue("?regionName", regionName); | ||
96 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | ||
97 | |||
98 | List<RegionData> ret = RunCommand(cmd); | ||
99 | if (ret.Count == 0) | ||
100 | return null; | ||
101 | |||
102 | return ret[0]; | ||
103 | } | ||
104 | |||
105 | } | ||
106 | |||
107 | public RegionData Get(int posX, int posY, UUID scopeID) | ||
85 | { | 108 | { |
86 | /* fixed size regions | 109 | /* fixed size regions |
87 | string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY"; | 110 | string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY"; |