aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2011-04-06 09:22:55 +0100
committerMelanie2011-04-06 09:22:55 +0100
commit407c2b182303d3bc1214e71f407bddc28c671a55 (patch)
treee9658864b8dcad3c2dced73e97b505941576de9b /OpenSim
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentChange some text to make the autoreturn mechanism more obvious, and align wit... (diff)
downloadopensim-SC_OLD-407c2b182303d3bc1214e71f407bddc28c671a55.zip
opensim-SC_OLD-407c2b182303d3bc1214e71f407bddc28c671a55.tar.gz
opensim-SC_OLD-407c2b182303d3bc1214e71f407bddc28c671a55.tar.bz2
opensim-SC_OLD-407c2b182303d3bc1214e71f407bddc28c671a55.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLEstateData.cs5
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs30
-rwxr-xr-xOpenSim/Data/Null/NullEstateData.cs133
-rw-r--r--OpenSim/Data/Null/NullSimulationData.cs17
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs22
-rw-r--r--OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs24
-rw-r--r--OpenSim/Framework/ILandChannel.cs1
-rw-r--r--OpenSim/Framework/ILandObject.cs2
-rw-r--r--OpenSim/Framework/LandData.cs67
-rw-r--r--OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs8
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs26
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs149
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandChannel.cs10
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs50
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs89
-rw-r--r--OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs31
-rw-r--r--OpenSim/Region/CoreModules/World/Sun/SunModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEstateDataService.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs19
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs3
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs73
-rw-r--r--OpenSim/Services/Connectors/Simulation/EstateDataService.cs5
25 files changed, 514 insertions, 279 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLEstateData.cs b/OpenSim/Data/MSSQL/MSSQLEstateData.cs
index 92a8d80..d10ebe4 100644
--- a/OpenSim/Data/MSSQL/MSSQLEstateData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLEstateData.cs
@@ -372,6 +372,11 @@ namespace OpenSim.Data.MSSQL
372 return new List<int>(); 372 return new List<int>();
373 } 373 }
374 374
375 public List<int> GetEstatesByOwner(UUID ownerID)
376 {
377 return new List<int>();
378 }
379
375 public bool LinkRegion(UUID regionID, int estateID) 380 public bool LinkRegion(UUID regionID, int estateID)
376 { 381 {
377 // TODO: Implementation! 382 // TODO: Implementation!
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index 6d72e82..86416d1 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -484,6 +484,36 @@ namespace OpenSim.Data.MySQL
484 return result; 484 return result;
485 } 485 }
486 486
487 public List<int> GetEstatesByOwner(UUID ownerID)
488 {
489 List<int> result = new List<int>();
490
491 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
492 {
493 dbcon.Open();
494
495 using (MySqlCommand cmd = dbcon.CreateCommand())
496 {
497 cmd.CommandText = "select estateID from estate_settings where EstateOwner = ?EstateOwner";
498 cmd.Parameters.AddWithValue("?EstateOwner", ownerID);
499
500 using (IDataReader reader = cmd.ExecuteReader())
501 {
502 while (reader.Read())
503 {
504 result.Add(Convert.ToInt32(reader["EstateID"]));
505 }
506 reader.Close();
507 }
508 }
509
510
511 dbcon.Close();
512 }
513
514 return result;
515 }
516
487 public bool LinkRegion(UUID regionID, int estateID) 517 public bool LinkRegion(UUID regionID, int estateID)
488 { 518 {
489 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 519 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
diff --git a/OpenSim/Data/Null/NullEstateData.cs b/OpenSim/Data/Null/NullEstateData.cs
new file mode 100755
index 0000000..0cebff5
--- /dev/null
+++ b/OpenSim/Data/Null/NullEstateData.cs
@@ -0,0 +1,133 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Reflection;
31using log4net;
32using OpenMetaverse;
33using OpenSim.Framework;
34using OpenSim.Region.Framework;
35using OpenSim.Region.Framework.Interfaces;
36
37namespace OpenSim.Data.Null
38{
39 public class NullEstateStore : IEstateDataStore
40 {
41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
42
43 private string m_connectionString;
44
45 protected virtual Assembly Assembly
46 {
47 get { return GetType().Assembly; }
48 }
49
50 public NullEstateStore()
51 {
52 }
53
54 public NullEstateStore(string connectionString)
55 {
56 Initialise(connectionString);
57 }
58
59 public void Initialise(string connectionString)
60 {
61 m_connectionString = connectionString;
62 }
63
64 private string[] FieldList
65 {
66 get { return new string[0]; }
67 }
68
69 public EstateSettings LoadEstateSettings(UUID regionID, bool create)
70 {
71 // This fools the initialization caller into thinking an estate was fetched (a check in OpenSimBase).
72 // The estate info is pretty empty so don't try banning anyone.
73 EstateSettings oneEstate = new EstateSettings();
74 oneEstate.EstateID = 1;
75 return oneEstate;
76 }
77
78 public void StoreEstateSettings(EstateSettings es)
79 {
80 return;
81 }
82
83 public EstateSettings LoadEstateSettings(int estateID)
84 {
85 return new EstateSettings();
86 }
87
88 public List<EstateSettings> LoadEstateSettingsAll()
89 {
90 List<EstateSettings> allEstateSettings = new List<EstateSettings>();
91 allEstateSettings.Add(new EstateSettings());
92 return allEstateSettings;
93 }
94
95 public List<int> GetEstatesAll()
96 {
97 List<int> result = new List<int>();
98 return result;
99 }
100
101 public List<int> GetEstates(string search)
102 {
103 List<int> result = new List<int>();
104 return result;
105 }
106
107 public bool LinkRegion(UUID regionID, int estateID)
108 {
109 return false;
110 }
111
112 public List<UUID> GetRegions(int estateID)
113 {
114 List<UUID> result = new List<UUID>();
115 return result;
116 }
117
118 public bool DeleteEstate(int estateID)
119 {
120 return false;
121 }
122
123 #region IEstateDataStore Members
124
125
126 public List<int> GetEstatesByOwner(UUID ownerID)
127 {
128 return new List<int>();
129 }
130
131 #endregion
132 }
133}
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs
index eb4e313..e8d733b 100644
--- a/OpenSim/Data/Null/NullSimulationData.cs
+++ b/OpenSim/Data/Null/NullSimulationData.cs
@@ -38,6 +38,15 @@ namespace OpenSim.Data.Null
38 /// </summary> 38 /// </summary>
39 public class NullSimulationData : ISimulationDataStore 39 public class NullSimulationData : ISimulationDataStore
40 { 40 {
41 public NullSimulationData()
42 {
43 }
44
45 public NullSimulationData(string connectionString)
46 {
47 Initialise(connectionString);
48 }
49
41 public void Initialise(string dbfile) 50 public void Initialise(string dbfile)
42 { 51 {
43 return; 52 return;
@@ -85,12 +94,20 @@ namespace OpenSim.Data.Null
85 return new List<SceneObjectGroup>(); 94 return new List<SceneObjectGroup>();
86 } 95 }
87 96
97 Dictionary<UUID, double[,]> m_terrains = new Dictionary<UUID, double[,]>();
88 public void StoreTerrain(double[,] ter, UUID regionID) 98 public void StoreTerrain(double[,] ter, UUID regionID)
89 { 99 {
100 if (m_terrains.ContainsKey(regionID))
101 m_terrains.Remove(regionID);
102 m_terrains.Add(regionID, ter);
90 } 103 }
91 104
92 public double[,] LoadTerrain(UUID regionID) 105 public double[,] LoadTerrain(UUID regionID)
93 { 106 {
107 if (m_terrains.ContainsKey(regionID))
108 {
109 return m_terrains[regionID];
110 }
94 return null; 111 return null;
95 } 112 }
96 113
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index 6afc540..2f05a6e 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -412,6 +412,28 @@ namespace OpenSim.Data.SQLite
412 return result; 412 return result;
413 } 413 }
414 414
415 public List<int> GetEstatesByOwner(UUID ownerID)
416 {
417 List<int> result = new List<int>();
418
419 string sql = "select EstateID from estate_settings where estate_settings.EstateOwner = :EstateOwner";
420
421 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
422
423 cmd.CommandText = sql;
424 cmd.Parameters.AddWithValue(":EstateOwner", ownerID);
425
426 IDataReader r = cmd.ExecuteReader();
427
428 while (r.Read())
429 {
430 result.Add(Convert.ToInt32(r["EstateID"]));
431 }
432 r.Close();
433
434 return result;
435 }
436
415 public bool LinkRegion(UUID regionID, int estateID) 437 public bool LinkRegion(UUID regionID, int estateID)
416 { 438 {
417 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); 439 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs
index ad28c00..4dd225f 100644
--- a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs
@@ -401,7 +401,29 @@ namespace OpenSim.Data.SQLiteLegacy
401 401
402 return result; 402 return result;
403 } 403 }
404 404
405 public List<int> GetEstatesByOwner(UUID ownerID)
406 {
407 List<int> result = new List<int>();
408
409 string sql = "select EstateID from estate_settings where estate_settings.EstateOwner = :EstateOwner";
410
411 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
412
413 cmd.CommandText = sql;
414 cmd.Parameters.Add(":EstateOwner", ownerID);
415
416 IDataReader r = cmd.ExecuteReader();
417
418 while (r.Read())
419 {
420 result.Add(Convert.ToInt32(r["EstateID"]));
421 }
422 r.Close();
423
424 return result;
425 }
426
405 public bool LinkRegion(UUID regionID, int estateID) 427 public bool LinkRegion(UUID regionID, int estateID)
406 { 428 {
407 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); 429 SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
diff --git a/OpenSim/Framework/ILandChannel.cs b/OpenSim/Framework/ILandChannel.cs
index 30bae16..869d4c8 100644
--- a/OpenSim/Framework/ILandChannel.cs
+++ b/OpenSim/Framework/ILandChannel.cs
@@ -77,7 +77,6 @@ namespace OpenSim.Region.Framework.Interfaces
77 /// </param> 77 /// </param>
78 void Clear(bool setupDefaultParcel); 78 void Clear(bool setupDefaultParcel);
79 79
80 bool IsLandPrimCountTainted();
81 bool IsForcefulBansAllowed(); 80 bool IsForcefulBansAllowed();
82 void UpdateLandObject(int localID, LandData data); 81 void UpdateLandObject(int localID, LandData data);
83 void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient); 82 void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient);
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs
index 931e24a..98ea01e 100644
--- a/OpenSim/Framework/ILandObject.cs
+++ b/OpenSim/Framework/ILandObject.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Framework
89 void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client); 89 void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client);
90 void SendLandObjectOwners(IClientAPI remote_client); 90 void SendLandObjectOwners(IClientAPI remote_client);
91 void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client); 91 void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client);
92 void ResetLandPrimCounts(); 92 void ResetOverMeRecord();
93 void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area); 93 void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
94 94
95 void DeedToGroup(UUID groupID); 95 void DeedToGroup(UUID groupID);
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs
index 0389a2d..282a128 100644
--- a/OpenSim/Framework/LandData.cs
+++ b/OpenSim/Framework/LandData.cs
@@ -54,12 +54,10 @@ namespace OpenSim.Framework
54 private int _claimPrice = 0; //Unemplemented 54 private int _claimPrice = 0; //Unemplemented
55 private UUID _globalID = UUID.Zero; 55 private UUID _globalID = UUID.Zero;
56 private UUID _groupID = UUID.Zero; 56 private UUID _groupID = UUID.Zero;
57 private int _groupPrims = 0;
58 private bool _isGroupOwned = false; 57 private bool _isGroupOwned = false;
59 private byte[] _bitmap = new byte[512]; 58 private byte[] _bitmap = new byte[512];
60 private string _description = String.Empty; 59 private string _description = String.Empty;
61 60
62
63 private uint _flags = (uint) ParcelFlags.AllowFly | (uint) ParcelFlags.AllowLandmark | 61 private uint _flags = (uint) ParcelFlags.AllowFly | (uint) ParcelFlags.AllowLandmark |
64 (uint) ParcelFlags.AllowAPrimitiveEntry | 62 (uint) ParcelFlags.AllowAPrimitiveEntry |
65 (uint) ParcelFlags.AllowDeedToGroup | 63 (uint) ParcelFlags.AllowDeedToGroup |
@@ -72,17 +70,13 @@ namespace OpenSim.Framework
72 private int _localID = 0; 70 private int _localID = 0;
73 private byte _mediaAutoScale = 0; 71 private byte _mediaAutoScale = 0;
74 private UUID _mediaID = UUID.Zero; 72 private UUID _mediaID = UUID.Zero;
75
76 private string _mediaURL = String.Empty; 73 private string _mediaURL = String.Empty;
77 private string _musicURL = String.Empty; 74 private string _musicURL = String.Empty;
78 private int _otherPrims = 0;
79 private UUID _ownerID = UUID.Zero; 75 private UUID _ownerID = UUID.Zero;
80 private int _ownerPrims = 0;
81 private List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 76 private List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
82 private float _passHours = 0; 77 private float _passHours = 0;
83 private int _passPrice = 0; 78 private int _passPrice = 0;
84 private int _salePrice = 0; //Unemeplemented. Parcels price. 79 private int _salePrice = 0; //Unemeplemented. Parcels price.
85 private int _selectedPrims = 0;
86 private int _simwideArea = 0; 80 private int _simwideArea = 0;
87 private int _simwidePrims = 0; 81 private int _simwidePrims = 0;
88 private UUID _snapshotID = UUID.Zero; 82 private UUID _snapshotID = UUID.Zero;
@@ -284,19 +278,6 @@ namespace OpenSim.Framework
284 } 278 }
285 279
286 /// <summary> 280 /// <summary>
287 /// Number of SceneObjectPart that are owned by a Group
288 /// </summary>
289 [XmlIgnore]
290 public int GroupPrims {
291 get {
292 return _groupPrims;
293 }
294 set {
295 _groupPrims = value;
296 }
297 }
298
299 /// <summary>
300 /// Returns true if the Land Parcel is owned by a group 281 /// Returns true if the Land Parcel is owned by a group
301 /// </summary> 282 /// </summary>
302 public bool IsGroupOwned { 283 public bool IsGroupOwned {
@@ -454,20 +435,6 @@ namespace OpenSim.Framework
454 } 435 }
455 436
456 /// <summary> 437 /// <summary>
457 /// Number of SceneObjectPart that are owned by users who do not own the parcel
458 /// and don't have the 'group. These are elegable for AutoReturn collection
459 /// </summary>
460 [XmlIgnore]
461 public int OtherPrims {
462 get {
463 return _otherPrims;
464 }
465 set {
466 _otherPrims = value;
467 }
468 }
469
470 /// <summary>
471 /// Owner Avatar or Group of the parcel. Naturally, all land masses must be 438 /// Owner Avatar or Group of the parcel. Naturally, all land masses must be
472 /// owned by someone 439 /// owned by someone
473 /// </summary> 440 /// </summary>
@@ -481,19 +448,6 @@ namespace OpenSim.Framework
481 } 448 }
482 449
483 /// <summary> 450 /// <summary>
484 /// Number of SceneObjectPart that are owned by the owner of the parcel
485 /// </summary>
486 [XmlIgnore]
487 public int OwnerPrims {
488 get {
489 return _ownerPrims;
490 }
491 set {
492 _ownerPrims = value;
493 }
494 }
495
496 /// <summary>
497 /// List of access data for the parcel. User data, some bitflags, and a time 451 /// List of access data for the parcel. User data, some bitflags, and a time
498 /// </summary> 452 /// </summary>
499 public List<ParcelManager.ParcelAccessEntry> ParcelAccessList { 453 public List<ParcelManager.ParcelAccessEntry> ParcelAccessList {
@@ -542,19 +496,6 @@ namespace OpenSim.Framework
542 } 496 }
543 497
544 /// <summary> 498 /// <summary>
545 /// Number of SceneObjectPart that are currently selected by avatar
546 /// </summary>
547 [XmlIgnore]
548 public int SelectedPrims {
549 get {
550 return _selectedPrims;
551 }
552 set {
553 _selectedPrims = value;
554 }
555 }
556
557 /// <summary>
558 /// Number of meters^2 in the Simulator 499 /// Number of meters^2 in the Simulator
559 /// </summary> 500 /// </summary>
560 [XmlIgnore] 501 [XmlIgnore]
@@ -619,7 +560,7 @@ namespace OpenSim.Framework
619 } 560 }
620 561
621 /// <summary> 562 /// <summary>
622 /// Number of minutes to return SceneObjectGroup that are owned by someone who doesn't own 563 /// Autoreturn number of minutes to return SceneObjectGroup that are owned by someone who doesn't own
623 /// the parcel and isn't set to the same 'group' as the parcel. 564 /// the parcel and isn't set to the same 'group' as the parcel.
624 /// </summary> 565 /// </summary>
625 public int OtherCleanTime { 566 public int OtherCleanTime {
@@ -666,10 +607,6 @@ namespace OpenSim.Framework
666 landData._claimPrice = _claimPrice; 607 landData._claimPrice = _claimPrice;
667 landData._globalID = _globalID; 608 landData._globalID = _globalID;
668 landData._groupID = _groupID; 609 landData._groupID = _groupID;
669 landData._groupPrims = _groupPrims;
670 landData._otherPrims = _otherPrims;
671 landData._ownerPrims = _ownerPrims;
672 landData._selectedPrims = _selectedPrims;
673 landData._isGroupOwned = _isGroupOwned; 610 landData._isGroupOwned = _isGroupOwned;
674 landData._localID = _localID; 611 landData._localID = _localID;
675 landData._landingType = _landingType; 612 landData._landingType = _landingType;
@@ -731,4 +668,4 @@ namespace OpenSim.Framework
731 return land; 668 return land;
732 } 669 }
733 } 670 }
734} 671} \ No newline at end of file
diff --git a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
index 70e87b3..c69c89d 100644
--- a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
+++ b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
@@ -42,10 +42,7 @@ namespace OpenSim.Framework.Serialization.Tests
42 private LandData landWithParcelAccessList; 42 private LandData landWithParcelAccessList;
43 43
44 private static string preSerialized = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList />\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>"; 44 private static string preSerialized = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList />\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
45 private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>2009-10-01T00:00:00</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>2010-10-20T00:00:00</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>"; 45 private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>2009-10-01T00:00:00</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>2010-10-20T00:00:00</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
46
47
48
49 46
50 [SetUp] 47 [SetUp]
51 public void setup() 48 public void setup()
@@ -62,7 +59,6 @@ namespace OpenSim.Framework.Serialization.Tests
62 this.land.ClaimPrice = 0; 59 this.land.ClaimPrice = 0;
63 this.land.GlobalID = new UUID("54ff9641-dd40-4a2c-b1f1-47dd3af24e50"); 60 this.land.GlobalID = new UUID("54ff9641-dd40-4a2c-b1f1-47dd3af24e50");
64 this.land.GroupID = new UUID("d740204e-bbbf-44aa-949d-02c7d739f6a5"); 61 this.land.GroupID = new UUID("d740204e-bbbf-44aa-949d-02c7d739f6a5");
65 this.land.GroupPrims = 0;
66 this.land.Description = "land data to test LandDataSerializer"; 62 this.land.Description = "land data to test LandDataSerializer";
67 this.land.Flags = (uint)(ParcelFlags.AllowDamage | ParcelFlags.AllowVoiceChat); 63 this.land.Flags = (uint)(ParcelFlags.AllowDamage | ParcelFlags.AllowVoiceChat);
68 this.land.LandingType = (byte)LandingType.Direct; 64 this.land.LandingType = (byte)LandingType.Direct;
@@ -132,4 +128,4 @@ namespace OpenSim.Framework.Serialization.Tests
132 "Reified LandData.Name != original LandData.Name (pre-serialized with parcel access list)"); 128 "Reified LandData.Name != original LandData.Name (pre-serialized with parcel access list)");
133 } 129 }
134 } 130 }
135} 131} \ No newline at end of file
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 311b1e4..789e86c 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -5003,7 +5003,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5003 AddLocalPacketHandler(PacketType.TeleportLocationRequest, HandleTeleportLocationRequest); 5003 AddLocalPacketHandler(PacketType.TeleportLocationRequest, HandleTeleportLocationRequest);
5004 AddLocalPacketHandler(PacketType.UUIDNameRequest, HandleUUIDNameRequest, false); 5004 AddLocalPacketHandler(PacketType.UUIDNameRequest, HandleUUIDNameRequest, false);
5005 AddLocalPacketHandler(PacketType.RegionHandleRequest, HandleRegionHandleRequest); 5005 AddLocalPacketHandler(PacketType.RegionHandleRequest, HandleRegionHandleRequest);
5006 AddLocalPacketHandler(PacketType.ParcelInfoRequest, HandleParcelInfoRequest, false); 5006 AddLocalPacketHandler(PacketType.ParcelInfoRequest, HandleParcelInfoRequest);
5007 AddLocalPacketHandler(PacketType.ParcelAccessListRequest, HandleParcelAccessListRequest, false); 5007 AddLocalPacketHandler(PacketType.ParcelAccessListRequest, HandleParcelAccessListRequest, false);
5008 AddLocalPacketHandler(PacketType.ParcelAccessListUpdate, HandleParcelAccessListUpdate, false); 5008 AddLocalPacketHandler(PacketType.ParcelAccessListUpdate, HandleParcelAccessListUpdate, false);
5009 AddLocalPacketHandler(PacketType.ParcelPropertiesRequest, HandleParcelPropertiesRequest, false); 5009 AddLocalPacketHandler(PacketType.ParcelPropertiesRequest, HandleParcelPropertiesRequest, false);
@@ -8876,13 +8876,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8876 case "instantmessage": 8876 case "instantmessage":
8877 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 8877 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
8878 { 8878 {
8879 if (messagePacket.ParamList.Length < 5) 8879 if (messagePacket.ParamList.Length < 2)
8880 return true; 8880 return true;
8881
8881 UUID invoice = messagePacket.MethodData.Invoice; 8882 UUID invoice = messagePacket.MethodData.Invoice;
8882 UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
8883 string SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter);
8884 string Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter);
8885 UUID sessionID = messagePacket.AgentData.SessionID; 8883 UUID sessionID = messagePacket.AgentData.SessionID;
8884
8885 UUID SenderID;
8886 string SenderName;
8887 string Message;
8888
8889 if (messagePacket.ParamList.Length < 5)
8890 {
8891 SenderID = AgentId;
8892 SenderName = Utils.BytesToString(messagePacket.ParamList[0].Parameter);
8893 Message = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
8894 }
8895 else
8896 {
8897 SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
8898 SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter);
8899 Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter);
8900 }
8901
8886 OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); 8902 OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message);
8887 } 8903 }
8888 return true; 8904 return true;
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index e8b5af0..6d9cb7f 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -202,12 +202,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
202 } 202 }
203 Scene.RegionInfo.RegionSettings.Save(); 203 Scene.RegionInfo.RegionSettings.Save();
204 TriggerRegionInfoChange(); 204 TriggerRegionInfoChange();
205 sendRegionHandshakeToAll();
205 sendRegionInfoPacketToAll(); 206 sendRegionInfoPacketToAll();
206 } 207 }
207 208
208 private void handleCommitEstateTerrainTextureRequest(IClientAPI remoteClient) 209 private void handleCommitEstateTerrainTextureRequest(IClientAPI remoteClient)
209 { 210 {
210 sendRegionHandshakeToAll(); 211 // sendRegionHandshakeToAll();
211 } 212 }
212 213
213 public void setRegionTerrainSettings(float WaterHeight, 214 public void setRegionTerrainSettings(float WaterHeight,
@@ -276,8 +277,25 @@ namespace OpenSim.Region.CoreModules.World.Estate
276 { 277 {
277 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) 278 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
278 { 279 {
280 if ((estateAccessType & 1) != 0) // All estates
281 {
282 List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner);
283 EstateSettings estateSettings;
284
285 foreach (int estateID in estateIDs)
286 {
287 if (estateID != Scene.RegionInfo.EstateSettings.EstateID)
288 {
289 estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID);
290 estateSettings.AddEstateUser(user);
291 estateSettings.Save();
292 }
293 }
294 }
295
279 Scene.RegionInfo.EstateSettings.AddEstateUser(user); 296 Scene.RegionInfo.EstateSettings.AddEstateUser(user);
280 Scene.RegionInfo.EstateSettings.Save(); 297 Scene.RegionInfo.EstateSettings.Save();
298
281 TriggerEstateInfoChange(); 299 TriggerEstateInfoChange();
282 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); 300 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID);
283 } 301 }
@@ -291,10 +309,26 @@ namespace OpenSim.Region.CoreModules.World.Estate
291 { 309 {
292 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) 310 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
293 { 311 {
312 if ((estateAccessType & 1) != 0) // All estates
313 {
314 List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner);
315 EstateSettings estateSettings;
316
317 foreach (int estateID in estateIDs)
318 {
319 if (estateID != Scene.RegionInfo.EstateSettings.EstateID)
320 {
321 estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID);
322 estateSettings.RemoveEstateUser(user);
323 estateSettings.Save();
324 }
325 }
326 }
327
294 Scene.RegionInfo.EstateSettings.RemoveEstateUser(user); 328 Scene.RegionInfo.EstateSettings.RemoveEstateUser(user);
295 Scene.RegionInfo.EstateSettings.Save(); 329 Scene.RegionInfo.EstateSettings.Save();
296 TriggerEstateInfoChange();
297 330
331 TriggerEstateInfoChange();
298 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); 332 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID);
299 } 333 }
300 else 334 else
@@ -306,8 +340,25 @@ namespace OpenSim.Region.CoreModules.World.Estate
306 { 340 {
307 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) 341 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
308 { 342 {
343 if ((estateAccessType & 1) != 0) // All estates
344 {
345 List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner);
346 EstateSettings estateSettings;
347
348 foreach (int estateID in estateIDs)
349 {
350 if (estateID != Scene.RegionInfo.EstateSettings.EstateID)
351 {
352 estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID);
353 estateSettings.AddEstateGroup(user);
354 estateSettings.Save();
355 }
356 }
357 }
358
309 Scene.RegionInfo.EstateSettings.AddEstateGroup(user); 359 Scene.RegionInfo.EstateSettings.AddEstateGroup(user);
310 Scene.RegionInfo.EstateSettings.Save(); 360 Scene.RegionInfo.EstateSettings.Save();
361
311 TriggerEstateInfoChange(); 362 TriggerEstateInfoChange();
312 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); 363 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID);
313 } 364 }
@@ -320,10 +371,26 @@ namespace OpenSim.Region.CoreModules.World.Estate
320 { 371 {
321 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) 372 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
322 { 373 {
374 if ((estateAccessType & 1) != 0) // All estates
375 {
376 List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner);
377 EstateSettings estateSettings;
378
379 foreach (int estateID in estateIDs)
380 {
381 if (estateID != Scene.RegionInfo.EstateSettings.EstateID)
382 {
383 estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID);
384 estateSettings.RemoveEstateGroup(user);
385 estateSettings.Save();
386 }
387 }
388 }
389
323 Scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); 390 Scene.RegionInfo.EstateSettings.RemoveEstateGroup(user);
324 Scene.RegionInfo.EstateSettings.Save(); 391 Scene.RegionInfo.EstateSettings.Save();
325 TriggerEstateInfoChange();
326 392
393 TriggerEstateInfoChange();
327 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); 394 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID);
328 } 395 }
329 else 396 else
@@ -351,6 +418,29 @@ namespace OpenSim.Region.CoreModules.World.Estate
351 if (!alreadyInList) 418 if (!alreadyInList)
352 { 419 {
353 420
421 if ((estateAccessType & 1) != 0) // All estates
422 {
423 List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner);
424 EstateSettings estateSettings;
425
426 foreach (int estateID in estateIDs)
427 {
428 if (estateID != Scene.RegionInfo.EstateSettings.EstateID)
429 {
430 EstateBan bitem = new EstateBan();
431
432 bitem.BannedUserID = user;
433 bitem.EstateID = (uint)estateID;
434 bitem.BannedHostAddress = "0.0.0.0";
435 bitem.BannedHostIPMask = "0.0.0.0";
436
437 estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID);
438 estateSettings.AddBan(bitem);
439 estateSettings.Save();
440 }
441 }
442 }
443
354 EstateBan item = new EstateBan(); 444 EstateBan item = new EstateBan();
355 445
356 item.BannedUserID = user; 446 item.BannedUserID = user;
@@ -360,6 +450,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
360 450
361 Scene.RegionInfo.EstateSettings.AddBan(item); 451 Scene.RegionInfo.EstateSettings.AddBan(item);
362 Scene.RegionInfo.EstateSettings.Save(); 452 Scene.RegionInfo.EstateSettings.Save();
453
363 TriggerEstateInfoChange(); 454 TriggerEstateInfoChange();
364 455
365 ScenePresence s = Scene.GetScenePresence(user); 456 ScenePresence s = Scene.GetScenePresence(user);
@@ -409,8 +500,25 @@ namespace OpenSim.Region.CoreModules.World.Estate
409 500
410 if (alreadyInList && listitem != null) 501 if (alreadyInList && listitem != null)
411 { 502 {
503 if ((estateAccessType & 1) != 0) // All estates
504 {
505 List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner);
506 EstateSettings estateSettings;
507
508 foreach (int estateID in estateIDs)
509 {
510 if (estateID != Scene.RegionInfo.EstateSettings.EstateID)
511 {
512 estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID);
513 estateSettings.RemoveBan(user);
514 estateSettings.Save();
515 }
516 }
517 }
518
412 Scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); 519 Scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID);
413 Scene.RegionInfo.EstateSettings.Save(); 520 Scene.RegionInfo.EstateSettings.Save();
521
414 TriggerEstateInfoChange(); 522 TriggerEstateInfoChange();
415 } 523 }
416 else 524 else
@@ -430,8 +538,25 @@ namespace OpenSim.Region.CoreModules.World.Estate
430 { 538 {
431 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) 539 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
432 { 540 {
541 if ((estateAccessType & 1) != 0) // All estates
542 {
543 List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner);
544 EstateSettings estateSettings;
545
546 foreach (int estateID in estateIDs)
547 {
548 if (estateID != Scene.RegionInfo.EstateSettings.EstateID)
549 {
550 estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID);
551 estateSettings.AddEstateManager(user);
552 estateSettings.Save();
553 }
554 }
555 }
556
433 Scene.RegionInfo.EstateSettings.AddEstateManager(user); 557 Scene.RegionInfo.EstateSettings.AddEstateManager(user);
434 Scene.RegionInfo.EstateSettings.Save(); 558 Scene.RegionInfo.EstateSettings.Save();
559
435 TriggerEstateInfoChange(); 560 TriggerEstateInfoChange();
436 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); 561 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID);
437 } 562 }
@@ -444,10 +569,26 @@ namespace OpenSim.Region.CoreModules.World.Estate
444 { 569 {
445 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) 570 if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions())
446 { 571 {
572 if ((estateAccessType & 1) != 0) // All estates
573 {
574 List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner);
575 EstateSettings estateSettings;
576
577 foreach (int estateID in estateIDs)
578 {
579 if (estateID != Scene.RegionInfo.EstateSettings.EstateID)
580 {
581 estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID);
582 estateSettings.RemoveEstateManager(user);
583 estateSettings.Save();
584 }
585 }
586 }
587
447 Scene.RegionInfo.EstateSettings.RemoveEstateManager(user); 588 Scene.RegionInfo.EstateSettings.RemoveEstateManager(user);
448 Scene.RegionInfo.EstateSettings.Save(); 589 Scene.RegionInfo.EstateSettings.Save();
449 TriggerEstateInfoChange();
450 590
591 TriggerEstateInfoChange();
451 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); 592 remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID);
452 } 593 }
453 else 594 else
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
index 7d990c2..7fc358d 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
@@ -133,16 +133,6 @@ namespace OpenSim.Region.CoreModules.World.Land
133 return new List<ILandObject>(); 133 return new List<ILandObject>();
134 } 134 }
135 135
136 public bool IsLandPrimCountTainted()
137 {
138 if (m_landManagementModule != null)
139 {
140 return m_landManagementModule.IsLandPrimCountTainted();
141 }
142
143 return false;
144 }
145
146 public bool IsForcefulBansAllowed() 136 public bool IsForcefulBansAllowed()
147 { 137 {
148 if (m_landManagementModule != null) 138 if (m_landManagementModule != null)
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index b5517a1..fae4f90 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -62,8 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Land
62 62
63 public class LandManagementModule : INonSharedRegionModule 63 public class LandManagementModule : INonSharedRegionModule
64 { 64 {
65 private static readonly ILog m_log = 65 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
66 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
67 66
68 private static readonly string remoteParcelRequestPath = "0009/"; 67 private static readonly string remoteParcelRequestPath = "0009/";
69 68
@@ -89,7 +88,6 @@ namespace OpenSim.Region.CoreModules.World.Land
89 /// </value> 88 /// </value>
90 private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); 89 private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>();
91 90
92 private bool m_landPrimCountTainted;
93 private int m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; 91 private int m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1;
94 92
95 private bool m_allowedForcefulBans = true; 93 private bool m_allowedForcefulBans = true;
@@ -128,18 +126,18 @@ namespace OpenSim.Region.CoreModules.World.Land
128 126
129 m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd; 127 m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd;
130 m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate; 128 m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate;
129 m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene;
130 m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate;
131
131 m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel; 132 m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel;
132 m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement; 133 m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement;
133 m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy; 134 m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy;
134 m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy; 135 m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy;
135 m_scene.EventManager.OnNewClient += EventManagerOnNewClient; 136 m_scene.EventManager.OnNewClient += EventManagerOnNewClient;
136 m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement; 137 m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement;
137 m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene;
138 m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage; 138 m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage;
139 m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage; 139 m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
140 m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan; 140 m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
141 m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate;
142 m_scene.EventManager.OnParcelPrimCountTainted += EventManagerOnParcelPrimCountTainted;
143 m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps; 141 m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
144 m_scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole; 142 m_scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole;
145 143
@@ -277,8 +275,8 @@ namespace OpenSim.Region.CoreModules.World.Land
277 /// <returns>The parcel created.</returns> 275 /// <returns>The parcel created.</returns>
278 protected ILandObject CreateDefaultParcel() 276 protected ILandObject CreateDefaultParcel()
279 { 277 {
280// m_log.DebugFormat( 278 m_log.DebugFormat(
281// "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName); 279 "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName);
282 280
283 ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); 281 ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);
284 fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 282 fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
@@ -695,34 +693,24 @@ namespace OpenSim.Region.CoreModules.World.Land
695 693
696 #region Parcel Modification 694 #region Parcel Modification
697 695
698 public void ResetAllLandPrimCounts() 696 public void ResetOverMeRecords()
699 { 697 {
700 lock (m_landList) 698 lock (m_landList)
701 { 699 {
702 foreach (LandObject p in m_landList.Values) 700 foreach (LandObject p in m_landList.Values)
703 { 701 {
704 p.ResetLandPrimCounts(); 702 p.ResetOverMeRecord();
705 } 703 }
706 } 704 }
707 } 705 }
708 706
709 public void EventManagerOnParcelPrimCountTainted()
710 {
711 m_landPrimCountTainted = true;
712 }
713
714 public bool IsLandPrimCountTainted()
715 {
716 return m_landPrimCountTainted;
717 }
718
719 public void EventManagerOnParcelPrimCountAdd(SceneObjectGroup obj) 707 public void EventManagerOnParcelPrimCountAdd(SceneObjectGroup obj)
720 { 708 {
721 Vector3 position = obj.AbsolutePosition; 709 Vector3 position = obj.AbsolutePosition;
722 ILandObject landUnderPrim = GetLandObject(position.X, position.Y); 710 ILandObject landUnderPrim = GetLandObject(position.X, position.Y);
723 if (landUnderPrim != null) 711 if (landUnderPrim != null)
724 { 712 {
725 ((LandObject)landUnderPrim).AddPrimToCount(obj); 713 ((LandObject)landUnderPrim).AddPrimOverMe(obj);
726 } 714 }
727 } 715 }
728 716
@@ -732,7 +720,7 @@ namespace OpenSim.Region.CoreModules.World.Land
732 { 720 {
733 foreach (LandObject p in m_landList.Values) 721 foreach (LandObject p in m_landList.Values)
734 { 722 {
735 p.RemovePrimFromCount(obj); 723 p.RemovePrimFromOverMe(obj);
736 } 724 }
737 } 725 }
738 } 726 }
@@ -765,8 +753,7 @@ namespace OpenSim.Region.CoreModules.World.Land
765 foreach (LandObject p in landOwnersAndParcels[owner]) 753 foreach (LandObject p in landOwnersAndParcels[owner])
766 { 754 {
767 simArea += p.LandData.Area; 755 simArea += p.LandData.Area;
768 simPrims += p.LandData.OwnerPrims + p.LandData.OtherPrims + p.LandData.GroupPrims + 756 simPrims += p.PrimCounts.Total;
769 p.LandData.SelectedPrims;
770 } 757 }
771 758
772 foreach (LandObject p in landOwnersAndParcels[owner]) 759 foreach (LandObject p in landOwnersAndParcels[owner])
@@ -783,7 +770,7 @@ namespace OpenSim.Region.CoreModules.World.Land
783// "[LAND MANAGEMENT MODULE]: Triggered EventManagerOnParcelPrimCountUpdate() for {0}", 770// "[LAND MANAGEMENT MODULE]: Triggered EventManagerOnParcelPrimCountUpdate() for {0}",
784// m_scene.RegionInfo.RegionName); 771// m_scene.RegionInfo.RegionName);
785 772
786 ResetAllLandPrimCounts(); 773 ResetOverMeRecords();
787 EntityBase[] entities = m_scene.Entities.GetEntities(); 774 EntityBase[] entities = m_scene.Entities.GetEntities();
788 foreach (EntityBase obj in entities) 775 foreach (EntityBase obj in entities)
789 { 776 {
@@ -796,15 +783,13 @@ namespace OpenSim.Region.CoreModules.World.Land
796 } 783 }
797 } 784 }
798 FinalizeLandPrimCountUpdate(); 785 FinalizeLandPrimCountUpdate();
799 m_landPrimCountTainted = false;
800 } 786 }
801 787
802 public void EventManagerOnRequestParcelPrimCountUpdate() 788 public void EventManagerOnRequestParcelPrimCountUpdate()
803 { 789 {
804 ResetAllLandPrimCounts(); 790 ResetOverMeRecords();
805 m_scene.EventManager.TriggerParcelPrimCountUpdate(); 791 m_scene.EventManager.TriggerParcelPrimCountUpdate();
806 FinalizeLandPrimCountUpdate(); 792 FinalizeLandPrimCountUpdate();
807 m_landPrimCountTainted = false;
808 } 793 }
809 794
810 /// <summary> 795 /// <summary>
@@ -868,8 +853,6 @@ namespace OpenSim.Region.CoreModules.World.Land
868 m_landList[startLandObjectIndex].ForceUpdateLandInfo(); 853 m_landList[startLandObjectIndex].ForceUpdateLandInfo();
869 } 854 }
870 855
871 EventManagerOnParcelPrimCountTainted();
872
873 //Now add the new land object 856 //Now add the new land object
874 ILandObject result = AddLandObject(newLand); 857 ILandObject result = AddLandObject(newLand);
875 UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData); 858 UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData);
@@ -936,7 +919,6 @@ namespace OpenSim.Region.CoreModules.World.Land
936 performFinalLandJoin(masterLandObject, slaveLandObject); 919 performFinalLandJoin(masterLandObject, slaveLandObject);
937 } 920 }
938 } 921 }
939 EventManagerOnParcelPrimCountTainted();
940 922
941 masterLandObject.SendLandUpdateToAvatarsOverMe(); 923 masterLandObject.SendLandUpdateToAvatarsOverMe();
942 } 924 }
@@ -1130,6 +1112,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1130 1112
1131 if (land != null) 1113 if (land != null)
1132 { 1114 {
1115 m_scene.EventManager.TriggerParcelPrimCountUpdate();
1133 m_landList[local_id].SendLandObjectOwners(remote_client); 1116 m_landList[local_id].SendLandObjectOwners(remote_client);
1134 } 1117 }
1135 else 1118 else
@@ -1375,7 +1358,8 @@ namespace OpenSim.Region.CoreModules.World.Land
1375 private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) 1358 private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps)
1376 { 1359 {
1377 IClientAPI client; 1360 IClientAPI client;
1378 if (! m_scene.TryGetClient(agentID, out client)) { 1361 if (!m_scene.TryGetClient(agentID, out client))
1362 {
1379 m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID); 1363 m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID);
1380 return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); 1364 return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
1381 } 1365 }
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index e87153b..57c7fc6 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -64,8 +64,6 @@ namespace OpenSim.Region.CoreModules.World.Land
64 64
65 #endregion 65 #endregion
66 66
67 #region ILandObject Members
68
69 public int GetPrimsFree() 67 public int GetPrimsFree()
70 { 68 {
71 m_scene.EventManager.TriggerParcelPrimCountUpdate(); 69 m_scene.EventManager.TriggerParcelPrimCountUpdate();
@@ -213,6 +211,7 @@ namespace OpenSim.Region.CoreModules.World.Land
213 return simMax; 211 return simMax;
214 } 212 }
215 } 213 }
214
216 #endregion 215 #endregion
217 216
218 #region Packet Request Handling 217 #region Packet Request Handling
@@ -944,9 +943,12 @@ namespace OpenSim.Region.CoreModules.World.Land
944 943
945 lock (primsOverMe) 944 lock (primsOverMe)
946 { 945 {
946// m_log.DebugFormat(
947// "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region",
948// remote_client.Name, primsOverMe.Count);
949
947 try 950 try
948 { 951 {
949
950 foreach (SceneObjectGroup obj in primsOverMe) 952 foreach (SceneObjectGroup obj in primsOverMe)
951 { 953 {
952 try 954 try
@@ -958,7 +960,7 @@ namespace OpenSim.Region.CoreModules.World.Land
958 } 960 }
959 catch (NullReferenceException) 961 catch (NullReferenceException)
960 { 962 {
961 m_log.Info("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel"); 963 m_log.Error("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel");
962 } 964 }
963 try 965 try
964 { 966 {
@@ -985,6 +987,7 @@ namespace OpenSim.Region.CoreModules.World.Land
985 public Dictionary<UUID, int> GetLandObjectOwners() 987 public Dictionary<UUID, int> GetLandObjectOwners()
986 { 988 {
987 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); 989 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>();
990
988 lock (primsOverMe) 991 lock (primsOverMe)
989 { 992 {
990 try 993 try
@@ -1021,8 +1024,10 @@ namespace OpenSim.Region.CoreModules.World.Land
1021 1024
1022 public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client) 1025 public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client)
1023 { 1026 {
1024 Dictionary<UUID,List<SceneObjectGroup>> returns = 1027// m_log.DebugFormat(
1025 new Dictionary<UUID,List<SceneObjectGroup>>(); 1028// "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name);
1029
1030 Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>();
1026 1031
1027 lock (primsOverMe) 1032 lock (primsOverMe)
1028 { 1033 {
@@ -1095,83 +1100,29 @@ namespace OpenSim.Region.CoreModules.World.Land
1095 1100
1096 #region Object Adding/Removing from Parcel 1101 #region Object Adding/Removing from Parcel
1097 1102
1098 public void ResetLandPrimCounts() 1103 public void ResetOverMeRecord()
1099 { 1104 {
1100 LandData.GroupPrims = 0;
1101 LandData.OwnerPrims = 0;
1102 LandData.OtherPrims = 0;
1103 LandData.SelectedPrims = 0;
1104
1105
1106 lock (primsOverMe) 1105 lock (primsOverMe)
1107 primsOverMe.Clear(); 1106 primsOverMe.Clear();
1108 } 1107 }
1109 1108
1110 public void AddPrimToCount(SceneObjectGroup obj) 1109 public void AddPrimOverMe(SceneObjectGroup obj)
1111 { 1110 {
1112 1111// m_log.DebugFormat("[LAND OBJECT]: Adding scene object {0} {1} over {2}", obj.Name, obj.LocalId, LandData.Name);
1113 UUID prim_owner = obj.OwnerID; 1112
1114 int prim_count = obj.PrimCount;
1115
1116 if (obj.IsSelected)
1117 {
1118 LandData.SelectedPrims += prim_count;
1119 }
1120 else
1121 {
1122 if (prim_owner == LandData.OwnerID)
1123 {
1124 LandData.OwnerPrims += prim_count;
1125 }
1126 else if ((obj.GroupID == LandData.GroupID ||
1127 prim_owner == LandData.GroupID) &&
1128 LandData.GroupID != UUID.Zero)
1129 {
1130 LandData.GroupPrims += prim_count;
1131 }
1132 else
1133 {
1134 LandData.OtherPrims += prim_count;
1135 }
1136 }
1137
1138 lock (primsOverMe) 1113 lock (primsOverMe)
1139 primsOverMe.Add(obj); 1114 primsOverMe.Add(obj);
1140 } 1115 }
1141 1116
1142 public void RemovePrimFromCount(SceneObjectGroup obj) 1117 public void RemovePrimFromOverMe(SceneObjectGroup obj)
1143 { 1118 {
1119// m_log.DebugFormat("[LAND OBJECT]: Removing scene object {0} {1} from over {2}", obj.Name, obj.LocalId, LandData.Name);
1120
1144 lock (primsOverMe) 1121 lock (primsOverMe)
1145 { 1122 primsOverMe.Remove(obj);
1146 if (primsOverMe.Contains(obj))
1147 {
1148 UUID prim_owner = obj.OwnerID;
1149 int prim_count = obj.PrimCount;
1150
1151 if (prim_owner == LandData.OwnerID)
1152 {
1153 LandData.OwnerPrims -= prim_count;
1154 }
1155 else if (obj.GroupID == LandData.GroupID ||
1156 prim_owner == LandData.GroupID)
1157 {
1158 LandData.GroupPrims -= prim_count;
1159 }
1160 else
1161 {
1162 LandData.OtherPrims -= prim_count;
1163 }
1164
1165 primsOverMe.Remove(obj);
1166 }
1167 }
1168 } 1123 }
1169 1124
1170 #endregion 1125 #endregion
1171
1172 #endregion
1173
1174 #endregion
1175 1126
1176 /// <summary> 1127 /// <summary>
1177 /// Set the media url for this land parcel 1128 /// Set the media url for this land parcel
@@ -1192,5 +1143,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1192 LandData.MusicURL = url; 1143 LandData.MusicURL = url;
1193 SendLandUpdateToAvatarsOverMe(); 1144 SendLandUpdateToAvatarsOverMe();
1194 } 1145 }
1146
1147 #endregion
1195 } 1148 }
1196} 1149}
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
index 2a9036d..9e931a6 100644
--- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
@@ -201,25 +201,29 @@ namespace OpenSim.Region.CoreModules.World.Land
201 else 201 else
202 parcelCounts.Users[obj.OwnerID] = partCount; 202 parcelCounts.Users[obj.OwnerID] = partCount;
203 203
204 if (landData.IsGroupOwned) 204 if (obj.IsSelected)
205 { 205 {
206 if (obj.OwnerID == landData.GroupID) 206 parcelCounts.Selected += partCount;
207 parcelCounts.Owner += partCount;
208 else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID)
209 parcelCounts.Group += partCount;
210 else
211 parcelCounts.Others += partCount;
212 } 207 }
213 else 208 else
214 { 209 {
215 if (obj.OwnerID == landData.OwnerID) 210 if (landData.IsGroupOwned)
216 parcelCounts.Owner += partCount; 211 {
212 if (obj.OwnerID == landData.GroupID)
213 parcelCounts.Owner += partCount;
214 else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID)
215 parcelCounts.Group += partCount;
216 else
217 parcelCounts.Others += partCount;
218 }
217 else 219 else
218 parcelCounts.Others += partCount; 220 {
221 if (obj.OwnerID == landData.OwnerID)
222 parcelCounts.Owner += partCount;
223 else
224 parcelCounts.Others += partCount;
225 }
219 } 226 }
220
221 if (obj.IsSelected)
222 parcelCounts.Selected += partCount;
223 } 227 }
224 } 228 }
225 229
@@ -375,6 +379,7 @@ namespace OpenSim.Region.CoreModules.World.Land
375 count = counts.Owner; 379 count = counts.Owner;
376 count += counts.Group; 380 count += counts.Group;
377 count += counts.Others; 381 count += counts.Others;
382 count += counts.Selected;
378 } 383 }
379 } 384 }
380 385
diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs
index cea7c78..4e14c73 100644
--- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs
@@ -469,8 +469,8 @@ namespace OpenSim.Region.CoreModules
469 m_SunFixedHour = FixedSunHour; 469 m_SunFixedHour = FixedSunHour;
470 m_SunFixed = FixedSun; 470 m_SunFixed = FixedSun;
471 471
472 m_log.DebugFormat("[SUN]: Sun Settings Update: Fixed Sun? : {0}", m_SunFixed.ToString()); 472 // m_log.DebugFormat("[SUN]: Sun Settings Update: Fixed Sun? : {0}", m_SunFixed.ToString());
473 m_log.DebugFormat("[SUN]: Sun Settings Update: Sun Hour : {0}", m_SunFixedHour.ToString()); 473 // m_log.DebugFormat("[SUN]: Sun Settings Update: Sun Hour : {0}", m_SunFixedHour.ToString());
474 474
475 receivedEstateToolsSunUpdate = true; 475 receivedEstateToolsSunUpdate = true;
476 476
@@ -480,7 +480,7 @@ namespace OpenSim.Region.CoreModules
480 // When sun settings are updated, we should update all clients with new settings. 480 // When sun settings are updated, we should update all clients with new settings.
481 SunUpdateToAllClients(); 481 SunUpdateToAllClients();
482 482
483 m_log.DebugFormat("[SUN]: PosTime : {0}", PosTime.ToString()); 483 // m_log.DebugFormat("[SUN]: PosTime : {0}", PosTime.ToString());
484 } 484 }
485 } 485 }
486 486
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs
index 38c10a6..7066cf2 100644
--- a/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs
@@ -71,6 +71,12 @@ namespace OpenSim.Region.Framework.Interfaces
71 List<int> GetEstates(string search); 71 List<int> GetEstates(string search);
72 72
73 /// <summary> 73 /// <summary>
74 /// Get the IDs of all estates owned by the given user.
75 /// </summary>
76 /// <returns>An empty list if no estates were found.</returns>
77 List<int> GetEstatesByOwner(UUID ownerID);
78
79 /// <summary>
74 /// Get the IDs of all estates. 80 /// Get the IDs of all estates.
75 /// </summary> 81 /// </summary>
76 /// <returns>An empty list if no estates were found.</returns> 82 /// <returns>An empty list if no estates were found.</returns>
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs
index c82661d..d790a30 100644
--- a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs
@@ -74,6 +74,12 @@ namespace OpenSim.Region.Framework.Interfaces
74 /// <param name="search">Name of estate to search for. This is the exact name, no parttern matching is done.</param> 74 /// <param name="search">Name of estate to search for. This is the exact name, no parttern matching is done.</param>
75 /// <returns></returns> 75 /// <returns></returns>
76 List<int> GetEstates(string search); 76 List<int> GetEstates(string search);
77
78 /// <summary>
79 /// Get the IDs of all estates owned by the given user.
80 /// </summary>
81 /// <returns>An empty list if no estates were found.</returns>
82 List<int> GetEstatesByOwner(UUID ownerID);
77 83
78 /// <summary> 84 /// <summary>
79 /// Get the IDs of all estates. 85 /// Get the IDs of all estates.
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 4eb5d64..2e82e1f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1458,20 +1458,6 @@ namespace OpenSim.Region.Framework.Scenes
1458 } 1458 }
1459 1459
1460 /// <summary> 1460 /// <summary>
1461 /// Recount SceneObjectPart in parcel aabb
1462 /// </summary>
1463 private void UpdateLand()
1464 {
1465 if (LandChannel != null)
1466 {
1467 if (LandChannel.IsLandPrimCountTainted())
1468 {
1469 EventManager.TriggerParcelPrimCountUpdate();
1470 }
1471 }
1472 }
1473
1474 /// <summary>
1475 /// Update the terrain if it needs to be updated. 1461 /// Update the terrain if it needs to be updated.
1476 /// </summary> 1462 /// </summary>
1477 private void UpdateTerrain() 1463 private void UpdateTerrain()
@@ -1565,8 +1551,11 @@ namespace OpenSim.Region.Framework.Scenes
1565 } 1551 }
1566 1552
1567 /// <summary> 1553 /// <summary>
1568 /// Return object to avatar Message 1554 /// Tell an agent that their object has been returned.
1569 /// </summary> 1555 /// </summary>
1556 /// <remarks>
1557 /// The actual return is handled by the caller.
1558 /// </remarks>
1570 /// <param name="agentID">Avatar Unique Id</param> 1559 /// <param name="agentID">Avatar Unique Id</param>
1571 /// <param name="objectName">Name of object returned</param> 1560 /// <param name="objectName">Name of object returned</param>
1572 /// <param name="location">Location of object returned</param> 1561 /// <param name="location">Location of object returned</param>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 776b3b3..86f06ca 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1590,8 +1590,10 @@ namespace OpenSim.Region.Framework.Scenes
1590 parcel.LandData.OtherCleanTime) 1590 parcel.LandData.OtherCleanTime)
1591 { 1591 {
1592 DetachFromBackup(); 1592 DetachFromBackup();
1593 m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString()); 1593 m_log.DebugFormat(
1594 m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel auto return"); 1594 "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn",
1595 RootPart.UUID);
1596 m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel autoreturn");
1595 m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero, 1597 m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero,
1596 DeRezAction.Return, UUID.Zero); 1598 DeRezAction.Return, UUID.Zero);
1597 1599
diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
index 781fe95..dddea3e 100644
--- a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
+++ b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs
@@ -33,6 +33,9 @@ using Nini.Config;
33using OpenSim.Region.Framework.Interfaces; 33using OpenSim.Region.Framework.Interfaces;
34using OpenSim.Region.Framework.Scenes; 34using OpenSim.Region.Framework.Scenes;
35 35
36[assembly: Addin("BareBonesSharedModule", "0.1")]
37[assembly: AddinDependency("OpenSim", "0.5")]
38
36namespace OpenSim.Region.OptionalModules.Example.BareBonesShared 39namespace OpenSim.Region.OptionalModules.Example.BareBonesShared
37{ 40{
38 /// <summary> 41 /// <summary>
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs
index 98e5453..a133e51 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs
@@ -130,11 +130,6 @@ public class RegionCombinerLargeLandChannel : ILandChannel
130 } 130 }
131 } 131 }
132 132
133 public bool IsLandPrimCountTainted()
134 {
135 return RootRegionLandChannel.IsLandPrimCountTainted();
136 }
137
138 public bool IsForcefulBansAllowed() 133 public bool IsForcefulBansAllowed()
139 { 134 {
140 return RootRegionLandChannel.IsForcefulBansAllowed(); 135 return RootRegionLandChannel.IsForcefulBansAllowed();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ea38427..c0b490a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -10472,63 +10472,42 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10472 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) 10472 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide)
10473 { 10473 {
10474 m_host.AddScriptLPS(1); 10474 m_host.AddScriptLPS(1);
10475
10476 ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
10475 10477
10476 LandData land = World.GetLandData((float)pos.x, (float)pos.y); 10478 if (lo == null)
10477
10478 if (land == null)
10479 {
10480 return 0; 10479 return 0;
10481 } 10480
10481 IPrimCounts pc = lo.PrimCounts;
10482 10482
10483 else 10483 if (sim_wide != ScriptBaseClass.FALSE)
10484 { 10484 {
10485 if (sim_wide != 0) 10485 if (category == ScriptBaseClass.PARCEL_COUNT_TOTAL)
10486 { 10486 {
10487 if (category == 0) 10487 return pc.Simulator;
10488 {
10489 return land.SimwidePrims;
10490 }
10491
10492 else
10493 {
10494 //public int simwideArea = 0;
10495 return 0;
10496 }
10497 } 10488 }
10498
10499 else 10489 else
10500 { 10490 {
10501 if (category == 0)//Total Prims 10491 // counts not implemented yet
10502 { 10492 return 0;
10503 return 0;//land.
10504 }
10505
10506 else if (category == 1)//Owner Prims
10507 {
10508 return land.OwnerPrims;
10509 }
10510
10511 else if (category == 2)//Group Prims
10512 {
10513 return land.GroupPrims;
10514 }
10515
10516 else if (category == 3)//Other Prims
10517 {
10518 return land.OtherPrims;
10519 }
10520
10521 else if (category == 4)//Selected
10522 {
10523 return land.SelectedPrims;
10524 }
10525
10526 else if (category == 5)//Temp
10527 {
10528 return 0;//land.
10529 }
10530 } 10493 }
10531 } 10494 }
10495 else
10496 {
10497 if (category == ScriptBaseClass.PARCEL_COUNT_TOTAL)
10498 return pc.Total;
10499 else if (category == ScriptBaseClass.PARCEL_COUNT_OWNER)
10500 return pc.Owner;
10501 else if (category == ScriptBaseClass.PARCEL_COUNT_GROUP)
10502 return pc.Group;
10503 else if (category == ScriptBaseClass.PARCEL_COUNT_OTHER)
10504 return pc.Others;
10505 else if (category == ScriptBaseClass.PARCEL_COUNT_SELECTED)
10506 return pc.Selected;
10507 else if (category == ScriptBaseClass.PARCEL_COUNT_TEMP)
10508 return 0; // counts not implemented yet
10509 }
10510
10532 return 0; 10511 return 0;
10533 } 10512 }
10534 10513
diff --git a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs
index d0588bf..7184ba1 100644
--- a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs
+++ b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs
@@ -111,6 +111,11 @@ namespace OpenSim.Services.Connectors
111 return m_database.GetEstatesAll(); 111 return m_database.GetEstatesAll();
112 } 112 }
113 113
114 public List<int> GetEstatesByOwner(UUID ownerID)
115 {
116 return m_database.GetEstatesByOwner(ownerID);
117 }
118
114 public bool LinkRegion(UUID regionID, int estateID) 119 public bool LinkRegion(UUID regionID, int estateID)
115 { 120 {
116 return m_database.LinkRegion(regionID, estateID); 121 return m_database.LinkRegion(regionID, estateID);