diff options
author | Melanie | 2013-05-11 01:27:37 +0100 |
---|---|---|
committer | Melanie | 2013-05-11 01:27:37 +0100 |
commit | 81d8deb1a830765ec64948db5ec3902894761f24 (patch) | |
tree | 300a4abe329bf8cec3557dd390cca0b86063bf61 | |
parent | Guard the scene list when estates are updated (diff) | |
download | opensim-SC_OLD-81d8deb1a830765ec64948db5ec3902894761f24.zip opensim-SC_OLD-81d8deb1a830765ec64948db5ec3902894761f24.tar.gz opensim-SC_OLD-81d8deb1a830765ec64948db5ec3902894761f24.tar.bz2 opensim-SC_OLD-81d8deb1a830765ec64948db5ec3902894761f24.tar.xz |
Send up the part missing from the Avination Estate commit.
Warning - contains a small migration.
-rw-r--r-- | OpenSim/Data/MySQL/Resources/EstateStore.migrations | 6 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/EstateStore.migrations | 9 | ||||
-rw-r--r-- | OpenSim/Framework/EstateSettings.cs | 34 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 |
5 files changed, 60 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/Resources/EstateStore.migrations b/OpenSim/Data/MySQL/Resources/EstateStore.migrations index df82a2e..2d1c2b5 100644 --- a/OpenSim/Data/MySQL/Resources/EstateStore.migrations +++ b/OpenSim/Data/MySQL/Resources/EstateStore.migrations | |||
@@ -77,5 +77,11 @@ BEGIN; | |||
77 | ALTER TABLE estate_settings AUTO_INCREMENT = 100; | 77 | ALTER TABLE estate_settings AUTO_INCREMENT = 100; |
78 | COMMIT; | 78 | COMMIT; |
79 | 79 | ||
80 | :VERSION 33 #--------------------- | ||
80 | 81 | ||
82 | BEGIN; | ||
83 | ALTER TABLE estate_settings ADD COLUMN `AllowLandmark` tinyint(4) NOT NULL default '1'; | ||
84 | ALTER TABLE estate_settings ADD COLUMN `AllowParcelChanges` tinyint(4) NOT NULL default '1'; | ||
85 | ALTER TABLE estate_settings ADD COLUMN `AllowSetHome` tinyint(4) NOT NULL default '1'; | ||
86 | COMMIT; | ||
81 | 87 | ||
diff --git a/OpenSim/Data/SQLite/Resources/EstateStore.migrations b/OpenSim/Data/SQLite/Resources/EstateStore.migrations index 62f6464..0aec49b 100644 --- a/OpenSim/Data/SQLite/Resources/EstateStore.migrations +++ b/OpenSim/Data/SQLite/Resources/EstateStore.migrations | |||
@@ -86,3 +86,12 @@ begin; | |||
86 | alter table estate_settings add column DenyMinors tinyint not null default 0; | 86 | alter table estate_settings add column DenyMinors tinyint not null default 0; |
87 | 87 | ||
88 | commit; | 88 | commit; |
89 | |||
90 | :VERSION 9 | ||
91 | |||
92 | begin; | ||
93 | alter table estate_settings add column AllowLandmark tinyint not null default '1'; | ||
94 | alter table estate_settings add column AllowParcelChanges tinyint not null default '1'; | ||
95 | alter table estate_settings add column AllowSetHome tinyint not null default '1'; | ||
96 | commit; | ||
97 | |||
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index a92abbf..a02993d 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -58,6 +58,30 @@ namespace OpenSim.Framework | |||
58 | set { m_EstateName = value; } | 58 | set { m_EstateName = value; } |
59 | } | 59 | } |
60 | 60 | ||
61 | private bool m_AllowLandmark = true; | ||
62 | |||
63 | public bool AllowLandmark | ||
64 | { | ||
65 | get { return m_AllowLandmark; } | ||
66 | set { m_AllowLandmark = value; } | ||
67 | } | ||
68 | |||
69 | private bool m_AllowParcelChanges = true; | ||
70 | |||
71 | public bool AllowParcelChanges | ||
72 | { | ||
73 | get { return m_AllowParcelChanges; } | ||
74 | set { m_AllowParcelChanges = value; } | ||
75 | } | ||
76 | |||
77 | private bool m_AllowSetHome = true; | ||
78 | |||
79 | public bool AllowSetHome | ||
80 | { | ||
81 | get { return m_AllowSetHome; } | ||
82 | set { m_AllowSetHome = value; } | ||
83 | } | ||
84 | |||
61 | private uint m_ParentEstateID = 1; | 85 | private uint m_ParentEstateID = 1; |
62 | 86 | ||
63 | public uint ParentEstateID | 87 | public uint ParentEstateID |
@@ -374,10 +398,18 @@ namespace OpenSim.Framework | |||
374 | return l_EstateAccess.Contains(user); | 398 | return l_EstateAccess.Contains(user); |
375 | } | 399 | } |
376 | 400 | ||
401 | public void SetFromFlags(ulong regionFlags) | ||
402 | { | ||
403 | ResetHomeOnTeleport = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.ResetHomeOnTeleport) == (ulong)OpenMetaverse.RegionFlags.ResetHomeOnTeleport); | ||
404 | BlockDwell = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.BlockDwell) == (ulong)OpenMetaverse.RegionFlags.BlockDwell); | ||
405 | AllowLandmark = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.AllowLandmark) == (ulong)OpenMetaverse.RegionFlags.AllowLandmark); | ||
406 | AllowParcelChanges = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.AllowParcelChanges) == (ulong)OpenMetaverse.RegionFlags.AllowParcelChanges); | ||
407 | AllowSetHome = ((regionFlags & (ulong)OpenMetaverse.RegionFlags.AllowSetHome) == (ulong)OpenMetaverse.RegionFlags.AllowSetHome); | ||
408 | } | ||
409 | |||
377 | public bool GroupAccess(UUID groupID) | 410 | public bool GroupAccess(UUID groupID) |
378 | { | 411 | { |
379 | return l_EstateGroups.Contains(groupID); | 412 | return l_EstateGroups.Contains(groupID); |
380 | } | 413 | } |
381 | |||
382 | } | 414 | } |
383 | } | 415 | } |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 91f6501..121b2aa 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -1245,6 +1245,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1245 | flags |= RegionFlags.NoFly; | 1245 | flags |= RegionFlags.NoFly; |
1246 | if (Scene.RegionInfo.RegionSettings.RestrictPushing) | 1246 | if (Scene.RegionInfo.RegionSettings.RestrictPushing) |
1247 | flags |= RegionFlags.RestrictPushObject; | 1247 | flags |= RegionFlags.RestrictPushObject; |
1248 | if (Scene.RegionInfo.RegionSettings.AllowLandJoinDivide) | ||
1249 | flags |= RegionFlags.AllowParcelChanges; | ||
1248 | if (Scene.RegionInfo.RegionSettings.BlockShowInSearch) | 1250 | if (Scene.RegionInfo.RegionSettings.BlockShowInSearch) |
1249 | flags |= RegionFlags.BlockParcelSearch; | 1251 | flags |= RegionFlags.BlockParcelSearch; |
1250 | 1252 | ||
@@ -1254,6 +1256,10 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1254 | flags |= RegionFlags.Sandbox; | 1256 | flags |= RegionFlags.Sandbox; |
1255 | if (Scene.RegionInfo.EstateSettings.AllowVoice) | 1257 | if (Scene.RegionInfo.EstateSettings.AllowVoice) |
1256 | flags |= RegionFlags.AllowVoice; | 1258 | flags |= RegionFlags.AllowVoice; |
1259 | if (Scene.RegionInfo.EstateSettings.AllowLandmark) | ||
1260 | flags |= RegionFlags.AllowLandmark; | ||
1261 | if (Scene.RegionInfo.EstateSettings.AllowSetHome) | ||
1262 | flags |= RegionFlags.AllowSetHome; | ||
1257 | if (Scene.RegionInfo.EstateSettings.BlockDwell) | 1263 | if (Scene.RegionInfo.EstateSettings.BlockDwell) |
1258 | flags |= RegionFlags.BlockDwell; | 1264 | flags |= RegionFlags.BlockDwell; |
1259 | if (Scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) | 1265 | if (Scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) |
@@ -1299,6 +1305,12 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1299 | flags |= RegionFlags.ResetHomeOnTeleport; | 1305 | flags |= RegionFlags.ResetHomeOnTeleport; |
1300 | if (Scene.RegionInfo.EstateSettings.TaxFree) | 1306 | if (Scene.RegionInfo.EstateSettings.TaxFree) |
1301 | flags |= RegionFlags.TaxFree; | 1307 | flags |= RegionFlags.TaxFree; |
1308 | if (Scene.RegionInfo.EstateSettings.AllowLandmark) | ||
1309 | flags |= RegionFlags.AllowLandmark; | ||
1310 | if (Scene.RegionInfo.EstateSettings.AllowParcelChanges) | ||
1311 | flags |= RegionFlags.AllowParcelChanges; | ||
1312 | if (Scene.RegionInfo.EstateSettings.AllowSetHome) | ||
1313 | flags |= RegionFlags.AllowSetHome; | ||
1302 | if (Scene.RegionInfo.EstateSettings.DenyMinors) | 1314 | if (Scene.RegionInfo.EstateSettings.DenyMinors) |
1303 | flags |= (RegionFlags)(1 << 30); | 1315 | flags |= (RegionFlags)(1 << 30); |
1304 | 1316 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2aba2dd..1fa2fc7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4188,8 +4188,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4188 | m_log.DebugFormat( | 4188 | m_log.DebugFormat( |
4189 | "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName); | 4189 | "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName); |
4190 | 4190 | ||
4191 | // XPTO: if this agent is not allowed here as root, always return false | ||
4192 | |||
4193 | // TODO: This check should probably be in QueryAccess(). | 4191 | // TODO: This check should probably be in QueryAccess(). |
4194 | ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); | 4192 | ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); |
4195 | if (nearestParcel == null) | 4193 | if (nearestParcel == null) |