aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLEstateData.cs
diff options
context:
space:
mode:
authorMelanie Thielker2010-05-04 17:56:30 +0200
committerMelanie2010-05-04 15:52:29 +0100
commit9635af61f082ab1619a9ca482c76e2e01b0a4c55 (patch)
treedcbf403cdcface67e9f70204290298ee6ba3b628 /OpenSim/Data/MySQL/MySQLEstateData.cs
parentRefix the fix (diff)
downloadopensim-SC-9635af61f082ab1619a9ca482c76e2e01b0a4c55.zip
opensim-SC-9635af61f082ab1619a9ca482c76e2e01b0a4c55.tar.gz
opensim-SC-9635af61f082ab1619a9ca482c76e2e01b0a4c55.tar.bz2
opensim-SC-9635af61f082ab1619a9ca482c76e2e01b0a4c55.tar.xz
Allow regions to get the list of the other regions in the estate
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index d0c02f0..08e2144 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -474,7 +474,36 @@ namespace OpenSim.Data.MySQL
474 474
475 public List<UUID> GetRegions(int estateID) 475 public List<UUID> GetRegions(int estateID)
476 { 476 {
477 return new List<UUID>(); 477 List<UUID> result = new List<UUID>();
478
479 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
480 {
481 dbcon.Open();
482
483 try
484 {
485 using (MySqlCommand cmd = dbcon.CreateCommand())
486 {
487 cmd.CommandText = "select RegionID from estate_map where EstateID = ?EstateID";
488 cmd.Parameters.AddWithValue("?EstateID", estateID.ToString());
489
490 using (IDataReader reader = cmd.ExecuteReader())
491 {
492 while(reader.Read())
493 result.Add(new UUID(reader["RegionID"].ToString()));
494 reader.Close();
495 }
496 }
497 }
498 catch (Exception e)
499 {
500 m_log.Error("[REGION DB]: Error reading estate map. " + e.ToString());
501 return result;
502 }
503 dbcon.Close();
504 }
505
506 return result;
478 } 507 }
479 508
480 public bool DeleteEstate(int estateID) 509 public bool DeleteEstate(int estateID)