diff options
author | Marck | 2010-07-31 20:16:39 +0200 |
---|---|---|
committer | Diva Canto | 2010-07-31 16:42:42 -0700 |
commit | 692e684ced49ffa59771d29819750e41ec58a2da (patch) | |
tree | 965106a59893031f4c94ab4ed2903d3a35664bad /OpenSim/Data/MySQL/MySQLRegionData.cs | |
parent | Thank you, Snoopy, for a patch to fix child prim movement. This still doesn't (diff) | |
download | opensim-SC_OLD-692e684ced49ffa59771d29819750e41ec58a2da.zip opensim-SC_OLD-692e684ced49ffa59771d29819750e41ec58a2da.tar.gz opensim-SC_OLD-692e684ced49ffa59771d29819750e41ec58a2da.tar.bz2 opensim-SC_OLD-692e684ced49ffa59771d29819750e41ec58a2da.tar.xz |
Implemented console command "show hyperlinks".
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index c7bddac..6dc62c6 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -280,32 +280,35 @@ namespace OpenSim.Data.MySQL | |||
280 | } | 280 | } |
281 | 281 | ||
282 | return false; | 282 | return false; |
283 | } | 283 | } |
284 | |||
284 | public List<RegionData> GetDefaultRegions(UUID scopeID) | 285 | public List<RegionData> GetDefaultRegions(UUID scopeID) |
285 | { | 286 | { |
286 | string command = "select * from `"+m_Realm+"` where (flags & 1) <> 0"; | 287 | return Get((int)RegionFlags.DefaultRegion, scopeID); |
287 | if (scopeID != UUID.Zero) | ||
288 | command += " and ScopeID = ?scopeID"; | ||
289 | |||
290 | MySqlCommand cmd = new MySqlCommand(command); | ||
291 | |||
292 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | ||
293 | |||
294 | return RunCommand(cmd); | ||
295 | } | 288 | } |
296 | 289 | ||
297 | public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) | 290 | public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) |
298 | { | 291 | { |
299 | string command = "select * from `"+m_Realm+"` where (flags & 2) <> 0"; | 292 | // TODO: distance-sort results |
300 | if (scopeID != UUID.Zero) | 293 | return Get((int)RegionFlags.FallbackRegion, scopeID); |
301 | command += " and ScopeID = ?scopeID"; | 294 | } |
302 | 295 | ||
303 | MySqlCommand cmd = new MySqlCommand(command); | 296 | public List<RegionData> GetHyperlinks(UUID scopeID) |
304 | 297 | { | |
305 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | 298 | return Get((int)RegionFlags.Hyperlink, scopeID); |
306 | 299 | } | |
307 | // TODO: distance-sort results | 300 | |
308 | return RunCommand(cmd); | 301 | private List<RegionData> Get(int regionFlags, UUID scopeID) |
309 | } | 302 | { |
303 | string command = "select * from `" + m_Realm + "` where (flags & " + regionFlags.ToString() + ") <> 0"; | ||
304 | if (scopeID != UUID.Zero) | ||
305 | command += " and ScopeID = ?scopeID"; | ||
306 | |||
307 | MySqlCommand cmd = new MySqlCommand(command); | ||
308 | |||
309 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | ||
310 | |||
311 | return RunCommand(cmd); | ||
312 | } | ||
310 | } | 313 | } |
311 | } | 314 | } |