diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 616 |
1 files changed, 262 insertions, 354 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 01f04d9..57ab135 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -24,12 +24,14 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | |||
27 | using System; | 28 | using System; |
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using System.IO; | 30 | using System.IO; |
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using System.Security; | 32 | using System.Security; |
32 | using log4net; | 33 | using log4net; |
34 | using Mono.Addins; | ||
33 | using Nini.Config; | 35 | using Nini.Config; |
34 | using OpenMetaverse; | 36 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
@@ -38,13 +40,17 @@ using OpenSim.Region.Framework.Scenes; | |||
38 | 40 | ||
39 | namespace OpenSim.Region.CoreModules.World.Estate | 41 | namespace OpenSim.Region.CoreModules.World.Estate |
40 | { | 42 | { |
41 | public class EstateManagementModule : IEstateModule | 43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "EstateManagementModule")] |
44 | public class EstateManagementModule : IEstateModule, INonSharedRegionModule | ||
42 | { | 45 | { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 47 | ||
45 | private delegate void LookupUUIDS(List<UUID> uuidLst); | 48 | private delegate void LookupUUIDS(List<UUID> uuidLst); |
46 | 49 | ||
47 | private Scene m_scene; | 50 | public Scene Scene { get; private set; } |
51 | public IUserManagement UserManager { get; private set; } | ||
52 | |||
53 | protected EstateManagementCommands m_commands; | ||
48 | 54 | ||
49 | private EstateTerrainXferHandler TerrainUploader; | 55 | private EstateTerrainXferHandler TerrainUploader; |
50 | 56 | ||
@@ -58,89 +64,89 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
58 | { | 64 | { |
59 | uint sun = 0; | 65 | uint sun = 0; |
60 | 66 | ||
61 | if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime) | 67 | if (!Scene.RegionInfo.EstateSettings.UseGlobalTime) |
62 | sun=(uint)(m_scene.RegionInfo.EstateSettings.SunPosition*1024.0) + 0x1800; | 68 | sun = (uint)(Scene.RegionInfo.EstateSettings.SunPosition * 1024.0) + 0x1800; |
63 | UUID estateOwner; | 69 | UUID estateOwner; |
64 | estateOwner = m_scene.RegionInfo.EstateSettings.EstateOwner; | 70 | estateOwner = Scene.RegionInfo.EstateSettings.EstateOwner; |
65 | 71 | ||
66 | if (m_scene.Permissions.IsGod(remote_client.AgentId)) | 72 | if (Scene.Permissions.IsGod(remote_client.AgentId)) |
67 | estateOwner = remote_client.AgentId; | 73 | estateOwner = remote_client.AgentId; |
68 | 74 | ||
69 | remote_client.SendDetailedEstateData(invoice, | 75 | remote_client.SendDetailedEstateData(invoice, |
70 | m_scene.RegionInfo.EstateSettings.EstateName, | 76 | Scene.RegionInfo.EstateSettings.EstateName, |
71 | m_scene.RegionInfo.EstateSettings.EstateID, | 77 | Scene.RegionInfo.EstateSettings.EstateID, |
72 | m_scene.RegionInfo.EstateSettings.ParentEstateID, | 78 | Scene.RegionInfo.EstateSettings.ParentEstateID, |
73 | GetEstateFlags(), | 79 | GetEstateFlags(), |
74 | sun, | 80 | sun, |
75 | m_scene.RegionInfo.RegionSettings.Covenant, | 81 | Scene.RegionInfo.RegionSettings.Covenant, |
76 | m_scene.RegionInfo.EstateSettings.AbuseEmail, | 82 | Scene.RegionInfo.EstateSettings.AbuseEmail, |
77 | estateOwner); | 83 | estateOwner); |
78 | 84 | ||
79 | remote_client.SendEstateList(invoice, | 85 | remote_client.SendEstateList(invoice, |
80 | (int)Constants.EstateAccessCodex.EstateManagers, | 86 | (int)Constants.EstateAccessCodex.EstateManagers, |
81 | m_scene.RegionInfo.EstateSettings.EstateManagers, | 87 | Scene.RegionInfo.EstateSettings.EstateManagers, |
82 | m_scene.RegionInfo.EstateSettings.EstateID); | 88 | Scene.RegionInfo.EstateSettings.EstateID); |
83 | 89 | ||
84 | remote_client.SendEstateList(invoice, | 90 | remote_client.SendEstateList(invoice, |
85 | (int)Constants.EstateAccessCodex.AccessOptions, | 91 | (int)Constants.EstateAccessCodex.AccessOptions, |
86 | m_scene.RegionInfo.EstateSettings.EstateAccess, | 92 | Scene.RegionInfo.EstateSettings.EstateAccess, |
87 | m_scene.RegionInfo.EstateSettings.EstateID); | 93 | Scene.RegionInfo.EstateSettings.EstateID); |
88 | 94 | ||
89 | remote_client.SendEstateList(invoice, | 95 | remote_client.SendEstateList(invoice, |
90 | (int)Constants.EstateAccessCodex.AllowedGroups, | 96 | (int)Constants.EstateAccessCodex.AllowedGroups, |
91 | m_scene.RegionInfo.EstateSettings.EstateGroups, | 97 | Scene.RegionInfo.EstateSettings.EstateGroups, |
92 | m_scene.RegionInfo.EstateSettings.EstateID); | 98 | Scene.RegionInfo.EstateSettings.EstateID); |
93 | 99 | ||
94 | remote_client.SendBannedUserList(invoice, | 100 | remote_client.SendBannedUserList(invoice, |
95 | m_scene.RegionInfo.EstateSettings.EstateBans, | 101 | Scene.RegionInfo.EstateSettings.EstateBans, |
96 | m_scene.RegionInfo.EstateSettings.EstateID); | 102 | Scene.RegionInfo.EstateSettings.EstateID); |
97 | } | 103 | } |
98 | 104 | ||
99 | private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, | 105 | private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, |
100 | int matureLevel, bool restrictPushObject, bool allowParcelChanges) | 106 | int matureLevel, bool restrictPushObject, bool allowParcelChanges) |
101 | { | 107 | { |
102 | if (blockTerraform) | 108 | if (blockTerraform) |
103 | m_scene.RegionInfo.RegionSettings.BlockTerraform = true; | 109 | Scene.RegionInfo.RegionSettings.BlockTerraform = true; |
104 | else | 110 | else |
105 | m_scene.RegionInfo.RegionSettings.BlockTerraform = false; | 111 | Scene.RegionInfo.RegionSettings.BlockTerraform = false; |
106 | 112 | ||
107 | if (noFly) | 113 | if (noFly) |
108 | m_scene.RegionInfo.RegionSettings.BlockFly = true; | 114 | Scene.RegionInfo.RegionSettings.BlockFly = true; |
109 | else | 115 | else |
110 | m_scene.RegionInfo.RegionSettings.BlockFly = false; | 116 | Scene.RegionInfo.RegionSettings.BlockFly = false; |
111 | 117 | ||
112 | if (allowDamage) | 118 | if (allowDamage) |
113 | m_scene.RegionInfo.RegionSettings.AllowDamage = true; | 119 | Scene.RegionInfo.RegionSettings.AllowDamage = true; |
114 | else | 120 | else |
115 | m_scene.RegionInfo.RegionSettings.AllowDamage = false; | 121 | Scene.RegionInfo.RegionSettings.AllowDamage = false; |
116 | 122 | ||
117 | if (blockLandResell) | 123 | if (blockLandResell) |
118 | m_scene.RegionInfo.RegionSettings.AllowLandResell = false; | 124 | Scene.RegionInfo.RegionSettings.AllowLandResell = false; |
119 | else | 125 | else |
120 | m_scene.RegionInfo.RegionSettings.AllowLandResell = true; | 126 | Scene.RegionInfo.RegionSettings.AllowLandResell = true; |
121 | 127 | ||
122 | m_scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents; | 128 | Scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents; |
123 | 129 | ||
124 | m_scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; | 130 | Scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; |
125 | 131 | ||
126 | if (matureLevel <= 13) | 132 | if (matureLevel <= 13) |
127 | m_scene.RegionInfo.RegionSettings.Maturity = 0; | 133 | Scene.RegionInfo.RegionSettings.Maturity = 0; |
128 | else if (matureLevel <= 21) | 134 | else if (matureLevel <= 21) |
129 | m_scene.RegionInfo.RegionSettings.Maturity = 1; | 135 | Scene.RegionInfo.RegionSettings.Maturity = 1; |
130 | else | 136 | else |
131 | m_scene.RegionInfo.RegionSettings.Maturity = 2; | 137 | Scene.RegionInfo.RegionSettings.Maturity = 2; |
132 | 138 | ||
133 | if (restrictPushObject) | 139 | if (restrictPushObject) |
134 | m_scene.RegionInfo.RegionSettings.RestrictPushing = true; | 140 | Scene.RegionInfo.RegionSettings.RestrictPushing = true; |
135 | else | 141 | else |
136 | m_scene.RegionInfo.RegionSettings.RestrictPushing = false; | 142 | Scene.RegionInfo.RegionSettings.RestrictPushing = false; |
137 | 143 | ||
138 | if (allowParcelChanges) | 144 | if (allowParcelChanges) |
139 | m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide = true; | 145 | Scene.RegionInfo.RegionSettings.AllowLandJoinDivide = true; |
140 | else | 146 | else |
141 | m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide = false; | 147 | Scene.RegionInfo.RegionSettings.AllowLandJoinDivide = false; |
142 | 148 | ||
143 | m_scene.RegionInfo.RegionSettings.Save(); | 149 | Scene.RegionInfo.RegionSettings.Save(); |
144 | TriggerRegionInfoChange(); | 150 | TriggerRegionInfoChange(); |
145 | 151 | ||
146 | sendRegionInfoPacketToAll(); | 152 | sendRegionInfoPacketToAll(); |
@@ -154,19 +160,19 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
154 | switch (corner) | 160 | switch (corner) |
155 | { | 161 | { |
156 | case 0: | 162 | case 0: |
157 | m_scene.RegionInfo.RegionSettings.TerrainTexture1 = texture; | 163 | Scene.RegionInfo.RegionSettings.TerrainTexture1 = texture; |
158 | break; | 164 | break; |
159 | case 1: | 165 | case 1: |
160 | m_scene.RegionInfo.RegionSettings.TerrainTexture2 = texture; | 166 | Scene.RegionInfo.RegionSettings.TerrainTexture2 = texture; |
161 | break; | 167 | break; |
162 | case 2: | 168 | case 2: |
163 | m_scene.RegionInfo.RegionSettings.TerrainTexture3 = texture; | 169 | Scene.RegionInfo.RegionSettings.TerrainTexture3 = texture; |
164 | break; | 170 | break; |
165 | case 3: | 171 | case 3: |
166 | m_scene.RegionInfo.RegionSettings.TerrainTexture4 = texture; | 172 | Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture; |
167 | break; | 173 | break; |
168 | } | 174 | } |
169 | m_scene.RegionInfo.RegionSettings.Save(); | 175 | Scene.RegionInfo.RegionSettings.Save(); |
170 | TriggerRegionInfoChange(); | 176 | TriggerRegionInfoChange(); |
171 | sendRegionInfoPacketToAll(); | 177 | sendRegionInfoPacketToAll(); |
172 | } | 178 | } |
@@ -176,23 +182,23 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
176 | switch (corner) | 182 | switch (corner) |
177 | { | 183 | { |
178 | case 0: | 184 | case 0: |
179 | m_scene.RegionInfo.RegionSettings.Elevation1SW = lowValue; | 185 | Scene.RegionInfo.RegionSettings.Elevation1SW = lowValue; |
180 | m_scene.RegionInfo.RegionSettings.Elevation2SW = highValue; | 186 | Scene.RegionInfo.RegionSettings.Elevation2SW = highValue; |
181 | break; | 187 | break; |
182 | case 1: | 188 | case 1: |
183 | m_scene.RegionInfo.RegionSettings.Elevation1NW = lowValue; | 189 | Scene.RegionInfo.RegionSettings.Elevation1NW = lowValue; |
184 | m_scene.RegionInfo.RegionSettings.Elevation2NW = highValue; | 190 | Scene.RegionInfo.RegionSettings.Elevation2NW = highValue; |
185 | break; | 191 | break; |
186 | case 2: | 192 | case 2: |
187 | m_scene.RegionInfo.RegionSettings.Elevation1SE = lowValue; | 193 | Scene.RegionInfo.RegionSettings.Elevation1SE = lowValue; |
188 | m_scene.RegionInfo.RegionSettings.Elevation2SE = highValue; | 194 | Scene.RegionInfo.RegionSettings.Elevation2SE = highValue; |
189 | break; | 195 | break; |
190 | case 3: | 196 | case 3: |
191 | m_scene.RegionInfo.RegionSettings.Elevation1NE = lowValue; | 197 | Scene.RegionInfo.RegionSettings.Elevation1NE = lowValue; |
192 | m_scene.RegionInfo.RegionSettings.Elevation2NE = highValue; | 198 | Scene.RegionInfo.RegionSettings.Elevation2NE = highValue; |
193 | break; | 199 | break; |
194 | } | 200 | } |
195 | m_scene.RegionInfo.RegionSettings.Save(); | 201 | Scene.RegionInfo.RegionSettings.Save(); |
196 | TriggerRegionInfoChange(); | 202 | TriggerRegionInfoChange(); |
197 | sendRegionInfoPacketToAll(); | 203 | sendRegionInfoPacketToAll(); |
198 | } | 204 | } |
@@ -208,30 +214,30 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
208 | bool UseGlobal, bool EstateFixedSun, float EstateSunHour) | 214 | bool UseGlobal, bool EstateFixedSun, float EstateSunHour) |
209 | { | 215 | { |
210 | // Water Height | 216 | // Water Height |
211 | m_scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight; | 217 | Scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight; |
212 | 218 | ||
213 | // Terraforming limits | 219 | // Terraforming limits |
214 | m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit = TerrainRaiseLimit; | 220 | Scene.RegionInfo.RegionSettings.TerrainRaiseLimit = TerrainRaiseLimit; |
215 | m_scene.RegionInfo.RegionSettings.TerrainLowerLimit = TerrainLowerLimit; | 221 | Scene.RegionInfo.RegionSettings.TerrainLowerLimit = TerrainLowerLimit; |
216 | 222 | ||
217 | // Time of day / fixed sun | 223 | // Time of day / fixed sun |
218 | m_scene.RegionInfo.RegionSettings.UseEstateSun = UseEstateSun; | 224 | Scene.RegionInfo.RegionSettings.UseEstateSun = UseEstateSun; |
219 | m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun; | 225 | Scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun; |
220 | m_scene.RegionInfo.RegionSettings.SunPosition = SunHour; | 226 | Scene.RegionInfo.RegionSettings.SunPosition = SunHour; |
221 | 227 | ||
222 | m_scene.TriggerEstateSunUpdate(); | 228 | Scene.TriggerEstateSunUpdate(); |
223 | 229 | ||
224 | //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); | 230 | //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); |
225 | //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString()); | 231 | //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString()); |
226 | 232 | ||
227 | sendRegionInfoPacketToAll(); | 233 | sendRegionInfoPacketToAll(); |
228 | m_scene.RegionInfo.RegionSettings.Save(); | 234 | Scene.RegionInfo.RegionSettings.Save(); |
229 | TriggerRegionInfoChange(); | 235 | TriggerRegionInfoChange(); |
230 | } | 236 | } |
231 | 237 | ||
232 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) | 238 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) |
233 | { | 239 | { |
234 | IRestartModule restartModule = m_scene.RequestModuleInterface<IRestartModule>(); | 240 | IRestartModule restartModule = Scene.RequestModuleInterface<IRestartModule>(); |
235 | if (restartModule != null) | 241 | if (restartModule != null) |
236 | { | 242 | { |
237 | List<int> times = new List<int>(); | 243 | List<int> times = new List<int>(); |
@@ -252,8 +258,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
252 | 258 | ||
253 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) | 259 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) |
254 | { | 260 | { |
255 | m_scene.RegionInfo.RegionSettings.Covenant = estateCovenantID; | 261 | Scene.RegionInfo.RegionSettings.Covenant = estateCovenantID; |
256 | m_scene.RegionInfo.RegionSettings.Save(); | 262 | Scene.RegionInfo.RegionSettings.Save(); |
257 | TriggerRegionInfoChange(); | 263 | TriggerRegionInfoChange(); |
258 | } | 264 | } |
259 | 265 | ||
@@ -261,17 +267,17 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
261 | { | 267 | { |
262 | // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. | 268 | // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. |
263 | 269 | ||
264 | if (user == m_scene.RegionInfo.EstateSettings.EstateOwner) | 270 | if (user == Scene.RegionInfo.EstateSettings.EstateOwner) |
265 | return; // never process EO | 271 | return; // never process EO |
266 | 272 | ||
267 | if ((estateAccessType & 4) != 0) // User add | 273 | if ((estateAccessType & 4) != 0) // User add |
268 | { | 274 | { |
269 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | 275 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
270 | { | 276 | { |
271 | m_scene.RegionInfo.EstateSettings.AddEstateUser(user); | 277 | Scene.RegionInfo.EstateSettings.AddEstateUser(user); |
272 | m_scene.RegionInfo.EstateSettings.Save(); | 278 | Scene.RegionInfo.EstateSettings.Save(); |
273 | TriggerEstateInfoChange(); | 279 | TriggerEstateInfoChange(); |
274 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); | 280 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); |
275 | } | 281 | } |
276 | else | 282 | else |
277 | { | 283 | { |
@@ -281,13 +287,13 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
281 | } | 287 | } |
282 | if ((estateAccessType & 8) != 0) // User remove | 288 | if ((estateAccessType & 8) != 0) // User remove |
283 | { | 289 | { |
284 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | 290 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
285 | { | 291 | { |
286 | m_scene.RegionInfo.EstateSettings.RemoveEstateUser(user); | 292 | Scene.RegionInfo.EstateSettings.RemoveEstateUser(user); |
287 | m_scene.RegionInfo.EstateSettings.Save(); | 293 | Scene.RegionInfo.EstateSettings.Save(); |
288 | TriggerEstateInfoChange(); | 294 | TriggerEstateInfoChange(); |
289 | 295 | ||
290 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); | 296 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); |
291 | } | 297 | } |
292 | else | 298 | else |
293 | { | 299 | { |
@@ -296,12 +302,12 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
296 | } | 302 | } |
297 | if ((estateAccessType & 16) != 0) // Group add | 303 | if ((estateAccessType & 16) != 0) // Group add |
298 | { | 304 | { |
299 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | 305 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
300 | { | 306 | { |
301 | m_scene.RegionInfo.EstateSettings.AddEstateGroup(user); | 307 | Scene.RegionInfo.EstateSettings.AddEstateGroup(user); |
302 | m_scene.RegionInfo.EstateSettings.Save(); | 308 | Scene.RegionInfo.EstateSettings.Save(); |
303 | TriggerEstateInfoChange(); | 309 | TriggerEstateInfoChange(); |
304 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID); | 310 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); |
305 | } | 311 | } |
306 | else | 312 | else |
307 | { | 313 | { |
@@ -310,13 +316,13 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
310 | } | 316 | } |
311 | if ((estateAccessType & 32) != 0) // Group remove | 317 | if ((estateAccessType & 32) != 0) // Group remove |
312 | { | 318 | { |
313 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | 319 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
314 | { | 320 | { |
315 | m_scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); | 321 | Scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); |
316 | m_scene.RegionInfo.EstateSettings.Save(); | 322 | Scene.RegionInfo.EstateSettings.Save(); |
317 | TriggerEstateInfoChange(); | 323 | TriggerEstateInfoChange(); |
318 | 324 | ||
319 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID); | 325 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); |
320 | } | 326 | } |
321 | else | 327 | else |
322 | { | 328 | { |
@@ -325,9 +331,9 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
325 | } | 331 | } |
326 | if ((estateAccessType & 64) != 0) // Ban add | 332 | if ((estateAccessType & 64) != 0) // Ban add |
327 | { | 333 | { |
328 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | 334 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || Scene.Permissions.BypassPermissions()) |
329 | { | 335 | { |
330 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | 336 | EstateBan[] banlistcheck = Scene.RegionInfo.EstateSettings.EstateBans; |
331 | 337 | ||
332 | bool alreadyInList = false; | 338 | bool alreadyInList = false; |
333 | 339 | ||
@@ -346,20 +352,20 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
346 | EstateBan item = new EstateBan(); | 352 | EstateBan item = new EstateBan(); |
347 | 353 | ||
348 | item.BannedUserID = user; | 354 | item.BannedUserID = user; |
349 | item.EstateID = m_scene.RegionInfo.EstateSettings.EstateID; | 355 | item.EstateID = Scene.RegionInfo.EstateSettings.EstateID; |
350 | item.BannedHostAddress = "0.0.0.0"; | 356 | item.BannedHostAddress = "0.0.0.0"; |
351 | item.BannedHostIPMask = "0.0.0.0"; | 357 | item.BannedHostIPMask = "0.0.0.0"; |
352 | 358 | ||
353 | m_scene.RegionInfo.EstateSettings.AddBan(item); | 359 | Scene.RegionInfo.EstateSettings.AddBan(item); |
354 | m_scene.RegionInfo.EstateSettings.Save(); | 360 | Scene.RegionInfo.EstateSettings.Save(); |
355 | TriggerEstateInfoChange(); | 361 | TriggerEstateInfoChange(); |
356 | 362 | ||
357 | ScenePresence s = m_scene.GetScenePresence(user); | 363 | ScenePresence s = Scene.GetScenePresence(user); |
358 | if (s != null) | 364 | if (s != null) |
359 | { | 365 | { |
360 | if (!s.IsChildAgent) | 366 | if (!s.IsChildAgent) |
361 | { | 367 | { |
362 | m_scene.TeleportClientHome(user, s.ControllingClient); | 368 | Scene.TeleportClientHome(user, s.ControllingClient); |
363 | } | 369 | } |
364 | } | 370 | } |
365 | 371 | ||
@@ -369,7 +375,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
369 | remote_client.SendAlertMessage("User is already on the region ban list"); | 375 | remote_client.SendAlertMessage("User is already on the region ban list"); |
370 | } | 376 | } |
371 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | 377 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
372 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | 378 | remote_client.SendBannedUserList(invoice, Scene.RegionInfo.EstateSettings.EstateBans, Scene.RegionInfo.EstateSettings.EstateID); |
373 | } | 379 | } |
374 | else | 380 | else |
375 | { | 381 | { |
@@ -378,9 +384,9 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
378 | } | 384 | } |
379 | if ((estateAccessType & 128) != 0) // Ban remove | 385 | if ((estateAccessType & 128) != 0) // Ban remove |
380 | { | 386 | { |
381 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | 387 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || Scene.Permissions.BypassPermissions()) |
382 | { | 388 | { |
383 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | 389 | EstateBan[] banlistcheck = Scene.RegionInfo.EstateSettings.EstateBans; |
384 | 390 | ||
385 | bool alreadyInList = false; | 391 | bool alreadyInList = false; |
386 | EstateBan listitem = null; | 392 | EstateBan listitem = null; |
@@ -393,20 +399,21 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
393 | listitem = banlistcheck[i]; | 399 | listitem = banlistcheck[i]; |
394 | break; | 400 | break; |
395 | } | 401 | } |
396 | |||
397 | } | 402 | } |
403 | |||
398 | if (alreadyInList && listitem != null) | 404 | if (alreadyInList && listitem != null) |
399 | { | 405 | { |
400 | m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); | 406 | Scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); |
401 | m_scene.RegionInfo.EstateSettings.Save(); | 407 | Scene.RegionInfo.EstateSettings.Save(); |
402 | TriggerEstateInfoChange(); | 408 | TriggerEstateInfoChange(); |
403 | } | 409 | } |
404 | else | 410 | else |
405 | { | 411 | { |
406 | remote_client.SendAlertMessage("User is not on the region ban list"); | 412 | remote_client.SendAlertMessage("User is not on the region ban list"); |
407 | } | 413 | } |
414 | |||
408 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | 415 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
409 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | 416 | remote_client.SendBannedUserList(invoice, Scene.RegionInfo.EstateSettings.EstateBans, Scene.RegionInfo.EstateSettings.EstateID); |
410 | } | 417 | } |
411 | else | 418 | else |
412 | { | 419 | { |
@@ -415,12 +422,12 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
415 | } | 422 | } |
416 | if ((estateAccessType & 256) != 0) // Manager add | 423 | if ((estateAccessType & 256) != 0) // Manager add |
417 | { | 424 | { |
418 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | 425 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
419 | { | 426 | { |
420 | m_scene.RegionInfo.EstateSettings.AddEstateManager(user); | 427 | Scene.RegionInfo.EstateSettings.AddEstateManager(user); |
421 | m_scene.RegionInfo.EstateSettings.Save(); | 428 | Scene.RegionInfo.EstateSettings.Save(); |
422 | TriggerEstateInfoChange(); | 429 | TriggerEstateInfoChange(); |
423 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | 430 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); |
424 | } | 431 | } |
425 | else | 432 | else |
426 | { | 433 | { |
@@ -429,13 +436,13 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
429 | } | 436 | } |
430 | if ((estateAccessType & 512) != 0) // Manager remove | 437 | if ((estateAccessType & 512) != 0) // Manager remove |
431 | { | 438 | { |
432 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | 439 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
433 | { | 440 | { |
434 | m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | 441 | Scene.RegionInfo.EstateSettings.RemoveEstateManager(user); |
435 | m_scene.RegionInfo.EstateSettings.Save(); | 442 | Scene.RegionInfo.EstateSettings.Save(); |
436 | TriggerEstateInfoChange(); | 443 | TriggerEstateInfoChange(); |
437 | 444 | ||
438 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | 445 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); |
439 | } | 446 | } |
440 | else | 447 | else |
441 | { | 448 | { |
@@ -447,7 +454,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
447 | private void SendSimulatorBlueBoxMessage( | 454 | private void SendSimulatorBlueBoxMessage( |
448 | IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) | 455 | IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) |
449 | { | 456 | { |
450 | IDialogModule dm = m_scene.RequestModuleInterface<IDialogModule>(); | 457 | IDialogModule dm = Scene.RequestModuleInterface<IDialogModule>(); |
451 | 458 | ||
452 | if (dm != null) | 459 | if (dm != null) |
453 | dm.SendNotificationToUsersInRegion(senderID, senderName, message); | 460 | dm.SendNotificationToUsersInRegion(senderID, senderName, message); |
@@ -462,61 +469,62 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
462 | private void handleEstateDebugRegionRequest(IClientAPI remote_client, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics) | 469 | private void handleEstateDebugRegionRequest(IClientAPI remote_client, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics) |
463 | { | 470 | { |
464 | if (physics) | 471 | if (physics) |
465 | m_scene.RegionInfo.RegionSettings.DisablePhysics = true; | 472 | Scene.RegionInfo.RegionSettings.DisablePhysics = true; |
466 | else | 473 | else |
467 | m_scene.RegionInfo.RegionSettings.DisablePhysics = false; | 474 | Scene.RegionInfo.RegionSettings.DisablePhysics = false; |
468 | 475 | ||
469 | if (scripted) | 476 | if (scripted) |
470 | m_scene.RegionInfo.RegionSettings.DisableScripts = true; | 477 | Scene.RegionInfo.RegionSettings.DisableScripts = true; |
471 | else | 478 | else |
472 | m_scene.RegionInfo.RegionSettings.DisableScripts = false; | 479 | Scene.RegionInfo.RegionSettings.DisableScripts = false; |
473 | 480 | ||
474 | if (collisionEvents) | 481 | if (collisionEvents) |
475 | m_scene.RegionInfo.RegionSettings.DisableCollisions = true; | 482 | Scene.RegionInfo.RegionSettings.DisableCollisions = true; |
476 | else | 483 | else |
477 | m_scene.RegionInfo.RegionSettings.DisableCollisions = false; | 484 | Scene.RegionInfo.RegionSettings.DisableCollisions = false; |
478 | 485 | ||
479 | 486 | ||
480 | m_scene.RegionInfo.RegionSettings.Save(); | 487 | Scene.RegionInfo.RegionSettings.Save(); |
481 | TriggerRegionInfoChange(); | 488 | TriggerRegionInfoChange(); |
482 | 489 | ||
483 | m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics); | 490 | Scene.SetSceneCoreDebug(scripted, collisionEvents, physics); |
484 | } | 491 | } |
485 | 492 | ||
486 | private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey) | 493 | private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey) |
487 | { | 494 | { |
488 | if (!m_scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) | 495 | if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) |
489 | return; | 496 | return; |
490 | 497 | ||
491 | if (prey != UUID.Zero) | 498 | if (prey != UUID.Zero) |
492 | { | 499 | { |
493 | ScenePresence s = m_scene.GetScenePresence(prey); | 500 | ScenePresence s = Scene.GetScenePresence(prey); |
494 | if (s != null) | 501 | if (s != null) |
495 | { | 502 | { |
496 | m_scene.TeleportClientHome(prey, s.ControllingClient); | 503 | Scene.TeleportClientHome(prey, s.ControllingClient); |
497 | } | 504 | } |
498 | } | 505 | } |
499 | } | 506 | } |
500 | 507 | ||
501 | private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID) | 508 | private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID) |
502 | { | 509 | { |
503 | if (!m_scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) | 510 | if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) |
504 | return; | 511 | return; |
505 | 512 | ||
506 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) | 513 | Scene.ForEachScenePresence(delegate(ScenePresence sp) |
507 | { | 514 | { |
508 | if (sp.UUID != senderID) | 515 | if (sp.UUID != senderID) |
509 | { | 516 | { |
510 | ScenePresence p = m_scene.GetScenePresence(sp.UUID); | 517 | ScenePresence p = Scene.GetScenePresence(sp.UUID); |
511 | // make sure they are still there, we could be working down a long list | 518 | // make sure they are still there, we could be working down a long list |
512 | // Also make sure they are actually in the region | 519 | // Also make sure they are actually in the region |
513 | if (p != null && !p.IsChildAgent) | 520 | if (p != null && !p.IsChildAgent) |
514 | { | 521 | { |
515 | m_scene.TeleportClientHome(p.UUID, p.ControllingClient); | 522 | Scene.TeleportClientHome(p.UUID, p.ControllingClient); |
516 | } | 523 | } |
517 | } | 524 | } |
518 | }); | 525 | }); |
519 | } | 526 | } |
527 | |||
520 | private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID) | 528 | private void AbortTerrainXferHandler(IClientAPI remoteClient, ulong XferID) |
521 | { | 529 | { |
522 | if (TerrainUploader != null) | 530 | if (TerrainUploader != null) |
@@ -547,11 +555,11 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
547 | TerrainUploader = null; | 555 | TerrainUploader = null; |
548 | } | 556 | } |
549 | remoteClient.SendAlertMessage("Terrain Upload Complete. Loading...."); | 557 | remoteClient.SendAlertMessage("Terrain Upload Complete. Loading...."); |
550 | ITerrainModule terr = m_scene.RequestModuleInterface<ITerrainModule>(); | 558 | ITerrainModule terr = Scene.RequestModuleInterface<ITerrainModule>(); |
551 | 559 | ||
552 | if (terr != null) | 560 | if (terr != null) |
553 | { | 561 | { |
554 | m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + m_scene.RegionInfo.RegionName); | 562 | m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName); |
555 | 563 | ||
556 | try | 564 | try |
557 | { | 565 | { |
@@ -597,7 +605,6 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
597 | 605 | ||
598 | private void handleUploadTerrain(IClientAPI remote_client, string clientFileName) | 606 | private void handleUploadTerrain(IClientAPI remote_client, string clientFileName) |
599 | { | 607 | { |
600 | |||
601 | if (TerrainUploader == null) | 608 | if (TerrainUploader == null) |
602 | { | 609 | { |
603 | 610 | ||
@@ -615,16 +622,16 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
615 | { | 622 | { |
616 | remote_client.SendAlertMessage("Another Terrain Upload is in progress. Please wait your turn!"); | 623 | remote_client.SendAlertMessage("Another Terrain Upload is in progress. Please wait your turn!"); |
617 | } | 624 | } |
618 | |||
619 | } | 625 | } |
626 | |||
620 | private void handleTerrainRequest(IClientAPI remote_client, string clientFileName) | 627 | private void handleTerrainRequest(IClientAPI remote_client, string clientFileName) |
621 | { | 628 | { |
622 | // Save terrain here | 629 | // Save terrain here |
623 | ITerrainModule terr = m_scene.RequestModuleInterface<ITerrainModule>(); | 630 | ITerrainModule terr = Scene.RequestModuleInterface<ITerrainModule>(); |
624 | 631 | ||
625 | if (terr != null) | 632 | if (terr != null) |
626 | { | 633 | { |
627 | m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + m_scene.RegionInfo.RegionName); | 634 | m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName); |
628 | if (File.Exists(Util.dataDir() + "/terrain.raw")) | 635 | if (File.Exists(Util.dataDir() + "/terrain.raw")) |
629 | { | 636 | { |
630 | File.Delete(Util.dataDir() + "/terrain.raw"); | 637 | File.Delete(Util.dataDir() + "/terrain.raw"); |
@@ -635,7 +642,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
635 | byte[] bdata = new byte[input.Length]; | 642 | byte[] bdata = new byte[input.Length]; |
636 | input.Read(bdata, 0, (int)input.Length); | 643 | input.Read(bdata, 0, (int)input.Length); |
637 | remote_client.SendAlertMessage("Terrain file written, starting download..."); | 644 | remote_client.SendAlertMessage("Terrain file written, starting download..."); |
638 | m_scene.XferManager.AddNewFile("terrain.raw", bdata); | 645 | Scene.XferManager.AddNewFile("terrain.raw", bdata); |
639 | // Tell client about it | 646 | // Tell client about it |
640 | m_log.Warn("[CLIENT]: Sending Terrain to " + remote_client.Name); | 647 | m_log.Warn("[CLIENT]: Sending Terrain to " + remote_client.Name); |
641 | remote_client.SendInitiateDownload("terrain.raw", clientFileName); | 648 | remote_client.SendInitiateDownload("terrain.raw", clientFileName); |
@@ -645,35 +652,35 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
645 | private void HandleRegionInfoRequest(IClientAPI remote_client) | 652 | private void HandleRegionInfoRequest(IClientAPI remote_client) |
646 | { | 653 | { |
647 | RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs(); | 654 | RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs(); |
648 | args.billableFactor = m_scene.RegionInfo.EstateSettings.BillableFactor; | 655 | args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor; |
649 | args.estateID = m_scene.RegionInfo.EstateSettings.EstateID; | 656 | args.estateID = Scene.RegionInfo.EstateSettings.EstateID; |
650 | args.maxAgents = (byte)m_scene.RegionInfo.RegionSettings.AgentLimit; | 657 | args.maxAgents = (byte)Scene.RegionInfo.RegionSettings.AgentLimit; |
651 | args.objectBonusFactor = (float)m_scene.RegionInfo.RegionSettings.ObjectBonus; | 658 | args.objectBonusFactor = (float)Scene.RegionInfo.RegionSettings.ObjectBonus; |
652 | args.parentEstateID = m_scene.RegionInfo.EstateSettings.ParentEstateID; | 659 | args.parentEstateID = Scene.RegionInfo.EstateSettings.ParentEstateID; |
653 | args.pricePerMeter = m_scene.RegionInfo.EstateSettings.PricePerMeter; | 660 | args.pricePerMeter = Scene.RegionInfo.EstateSettings.PricePerMeter; |
654 | args.redirectGridX = m_scene.RegionInfo.EstateSettings.RedirectGridX; | 661 | args.redirectGridX = Scene.RegionInfo.EstateSettings.RedirectGridX; |
655 | args.redirectGridY = m_scene.RegionInfo.EstateSettings.RedirectGridY; | 662 | args.redirectGridY = Scene.RegionInfo.EstateSettings.RedirectGridY; |
656 | args.regionFlags = GetRegionFlags(); | 663 | args.regionFlags = GetRegionFlags(); |
657 | args.simAccess = m_scene.RegionInfo.AccessLevel; | 664 | args.simAccess = Scene.RegionInfo.AccessLevel; |
658 | args.sunHour = (float)m_scene.RegionInfo.RegionSettings.SunPosition; | 665 | args.sunHour = (float)Scene.RegionInfo.RegionSettings.SunPosition; |
659 | args.terrainLowerLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit; | 666 | args.terrainLowerLimit = (float)Scene.RegionInfo.RegionSettings.TerrainLowerLimit; |
660 | args.terrainRaiseLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit; | 667 | args.terrainRaiseLimit = (float)Scene.RegionInfo.RegionSettings.TerrainRaiseLimit; |
661 | args.useEstateSun = m_scene.RegionInfo.RegionSettings.UseEstateSun; | 668 | args.useEstateSun = Scene.RegionInfo.RegionSettings.UseEstateSun; |
662 | args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; | 669 | args.waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight; |
663 | args.simName = m_scene.RegionInfo.RegionName; | 670 | args.simName = Scene.RegionInfo.RegionName; |
664 | args.regionType = m_scene.RegionInfo.RegionType; | 671 | args.regionType = Scene.RegionInfo.RegionType; |
665 | 672 | ||
666 | remote_client.SendRegionInfoToEstateMenu(args); | 673 | remote_client.SendRegionInfoToEstateMenu(args); |
667 | } | 674 | } |
668 | 675 | ||
669 | private void HandleEstateCovenantRequest(IClientAPI remote_client) | 676 | private void HandleEstateCovenantRequest(IClientAPI remote_client) |
670 | { | 677 | { |
671 | remote_client.SendEstateCovenantInformation(m_scene.RegionInfo.RegionSettings.Covenant); | 678 | remote_client.SendEstateCovenantInformation(Scene.RegionInfo.RegionSettings.Covenant); |
672 | } | 679 | } |
673 | 680 | ||
674 | private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient) | 681 | private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient) |
675 | { | 682 | { |
676 | if (!m_scene.Permissions.CanIssueEstateCommand(remoteClient.AgentId, false)) | 683 | if (!Scene.Permissions.CanIssueEstateCommand(remoteClient.AgentId, false)) |
677 | return; | 684 | return; |
678 | 685 | ||
679 | Dictionary<uint, float> SceneData = new Dictionary<uint,float>(); | 686 | Dictionary<uint, float> SceneData = new Dictionary<uint,float>(); |
@@ -681,11 +688,11 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
681 | 688 | ||
682 | if (reportType == 1) | 689 | if (reportType == 1) |
683 | { | 690 | { |
684 | SceneData = m_scene.PhysicsScene.GetTopColliders(); | 691 | SceneData = Scene.PhysicsScene.GetTopColliders(); |
685 | } | 692 | } |
686 | else if (reportType == 0) | 693 | else if (reportType == 0) |
687 | { | 694 | { |
688 | SceneData = m_scene.SceneGraph.GetTopScripts(); | 695 | SceneData = Scene.SceneGraph.GetTopScripts(); |
689 | } | 696 | } |
690 | 697 | ||
691 | List<LandStatReportItem> SceneReport = new List<LandStatReportItem>(); | 698 | List<LandStatReportItem> SceneReport = new List<LandStatReportItem>(); |
@@ -693,7 +700,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
693 | { | 700 | { |
694 | foreach (uint obj in SceneData.Keys) | 701 | foreach (uint obj in SceneData.Keys) |
695 | { | 702 | { |
696 | SceneObjectPart prt = m_scene.GetSceneObjectPart(obj); | 703 | SceneObjectPart prt = Scene.GetSceneObjectPart(obj); |
697 | if (prt != null) | 704 | if (prt != null) |
698 | { | 705 | { |
699 | if (prt.ParentGroup != null) | 706 | if (prt.ParentGroup != null) |
@@ -765,7 +772,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
765 | { | 772 | { |
766 | // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); | 773 | // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); |
767 | 774 | ||
768 | IUserManagement userManager = m_scene.RequestModuleInterface<IUserManagement>(); | 775 | IUserManagement userManager = Scene.RequestModuleInterface<IUserManagement>(); |
769 | if (userManager != null) | 776 | if (userManager != null) |
770 | userManager.GetUserName(uuidarr[i]); | 777 | userManager.GetUserName(uuidarr[i]); |
771 | 778 | ||
@@ -780,7 +787,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
780 | 787 | ||
781 | public void sendRegionInfoPacketToAll() | 788 | public void sendRegionInfoPacketToAll() |
782 | { | 789 | { |
783 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) | 790 | Scene.ForEachScenePresence(delegate(ScenePresence sp) |
784 | { | 791 | { |
785 | if (!sp.IsChildAgent) | 792 | if (!sp.IsChildAgent) |
786 | HandleRegionInfoRequest(sp.ControllingClient); | 793 | HandleRegionInfoRequest(sp.ControllingClient); |
@@ -791,99 +798,99 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
791 | { | 798 | { |
792 | RegionHandshakeArgs args = new RegionHandshakeArgs(); | 799 | RegionHandshakeArgs args = new RegionHandshakeArgs(); |
793 | 800 | ||
794 | args.isEstateManager = m_scene.RegionInfo.EstateSettings.IsEstateManager(remoteClient.AgentId); | 801 | args.isEstateManager = Scene.RegionInfo.EstateSettings.IsEstateManager(remoteClient.AgentId); |
795 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero && m_scene.RegionInfo.EstateSettings.EstateOwner == remoteClient.AgentId) | 802 | if (Scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero && Scene.RegionInfo.EstateSettings.EstateOwner == remoteClient.AgentId) |
796 | args.isEstateManager = true; | 803 | args.isEstateManager = true; |
797 | 804 | ||
798 | args.billableFactor = m_scene.RegionInfo.EstateSettings.BillableFactor; | 805 | args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor; |
799 | args.terrainStartHeight0 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SW; | 806 | args.terrainStartHeight0 = (float)Scene.RegionInfo.RegionSettings.Elevation1SW; |
800 | args.terrainHeightRange0 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SW; | 807 | args.terrainHeightRange0 = (float)Scene.RegionInfo.RegionSettings.Elevation2SW; |
801 | args.terrainStartHeight1 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NW; | 808 | args.terrainStartHeight1 = (float)Scene.RegionInfo.RegionSettings.Elevation1NW; |
802 | args.terrainHeightRange1 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NW; | 809 | args.terrainHeightRange1 = (float)Scene.RegionInfo.RegionSettings.Elevation2NW; |
803 | args.terrainStartHeight2 = (float)m_scene.RegionInfo.RegionSettings.Elevation1SE; | 810 | args.terrainStartHeight2 = (float)Scene.RegionInfo.RegionSettings.Elevation1SE; |
804 | args.terrainHeightRange2 = (float)m_scene.RegionInfo.RegionSettings.Elevation2SE; | 811 | args.terrainHeightRange2 = (float)Scene.RegionInfo.RegionSettings.Elevation2SE; |
805 | args.terrainStartHeight3 = (float)m_scene.RegionInfo.RegionSettings.Elevation1NE; | 812 | args.terrainStartHeight3 = (float)Scene.RegionInfo.RegionSettings.Elevation1NE; |
806 | args.terrainHeightRange3 = (float)m_scene.RegionInfo.RegionSettings.Elevation2NE; | 813 | args.terrainHeightRange3 = (float)Scene.RegionInfo.RegionSettings.Elevation2NE; |
807 | args.simAccess = m_scene.RegionInfo.AccessLevel; | 814 | args.simAccess = Scene.RegionInfo.AccessLevel; |
808 | args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; | 815 | args.waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight; |
809 | args.regionFlags = GetRegionFlags(); | 816 | args.regionFlags = GetRegionFlags(); |
810 | args.regionName = m_scene.RegionInfo.RegionName; | 817 | args.regionName = Scene.RegionInfo.RegionName; |
811 | args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner; | 818 | args.SimOwner = Scene.RegionInfo.EstateSettings.EstateOwner; |
812 | 819 | ||
813 | args.terrainBase0 = UUID.Zero; | 820 | args.terrainBase0 = UUID.Zero; |
814 | args.terrainBase1 = UUID.Zero; | 821 | args.terrainBase1 = UUID.Zero; |
815 | args.terrainBase2 = UUID.Zero; | 822 | args.terrainBase2 = UUID.Zero; |
816 | args.terrainBase3 = UUID.Zero; | 823 | args.terrainBase3 = UUID.Zero; |
817 | args.terrainDetail0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1; | 824 | args.terrainDetail0 = Scene.RegionInfo.RegionSettings.TerrainTexture1; |
818 | args.terrainDetail1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2; | 825 | args.terrainDetail1 = Scene.RegionInfo.RegionSettings.TerrainTexture2; |
819 | args.terrainDetail2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3; | 826 | args.terrainDetail2 = Scene.RegionInfo.RegionSettings.TerrainTexture3; |
820 | args.terrainDetail3 = m_scene.RegionInfo.RegionSettings.TerrainTexture4; | 827 | args.terrainDetail3 = Scene.RegionInfo.RegionSettings.TerrainTexture4; |
821 | 828 | ||
822 | remoteClient.SendRegionHandshake(m_scene.RegionInfo,args); | 829 | remoteClient.SendRegionHandshake(Scene.RegionInfo,args); |
823 | } | 830 | } |
824 | 831 | ||
825 | public void sendRegionHandshakeToAll() | 832 | public void sendRegionHandshakeToAll() |
826 | { | 833 | { |
827 | m_scene.ForEachClient(sendRegionHandshake); | 834 | Scene.ForEachClient(sendRegionHandshake); |
828 | } | 835 | } |
829 | 836 | ||
830 | public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2) | 837 | public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2) |
831 | { | 838 | { |
832 | if (parms2 == 0) | 839 | if (parms2 == 0) |
833 | { | 840 | { |
834 | m_scene.RegionInfo.EstateSettings.UseGlobalTime = true; | 841 | Scene.RegionInfo.EstateSettings.UseGlobalTime = true; |
835 | m_scene.RegionInfo.EstateSettings.SunPosition = 0.0; | 842 | Scene.RegionInfo.EstateSettings.SunPosition = 0.0; |
836 | } | 843 | } |
837 | else | 844 | else |
838 | { | 845 | { |
839 | m_scene.RegionInfo.EstateSettings.UseGlobalTime = false; | 846 | Scene.RegionInfo.EstateSettings.UseGlobalTime = false; |
840 | m_scene.RegionInfo.EstateSettings.SunPosition = (parms2 - 0x1800)/1024.0; | 847 | Scene.RegionInfo.EstateSettings.SunPosition = (parms2 - 0x1800)/1024.0; |
841 | } | 848 | } |
842 | 849 | ||
843 | if ((parms1 & 0x00000010) != 0) | 850 | if ((parms1 & 0x00000010) != 0) |
844 | m_scene.RegionInfo.EstateSettings.FixedSun = true; | 851 | Scene.RegionInfo.EstateSettings.FixedSun = true; |
845 | else | 852 | else |
846 | m_scene.RegionInfo.EstateSettings.FixedSun = false; | 853 | Scene.RegionInfo.EstateSettings.FixedSun = false; |
847 | 854 | ||
848 | if ((parms1 & 0x00008000) != 0) | 855 | if ((parms1 & 0x00008000) != 0) |
849 | m_scene.RegionInfo.EstateSettings.PublicAccess = true; | 856 | Scene.RegionInfo.EstateSettings.PublicAccess = true; |
850 | else | 857 | else |
851 | m_scene.RegionInfo.EstateSettings.PublicAccess = false; | 858 | Scene.RegionInfo.EstateSettings.PublicAccess = false; |
852 | 859 | ||
853 | if ((parms1 & 0x10000000) != 0) | 860 | if ((parms1 & 0x10000000) != 0) |
854 | m_scene.RegionInfo.EstateSettings.AllowVoice = true; | 861 | Scene.RegionInfo.EstateSettings.AllowVoice = true; |
855 | else | 862 | else |
856 | m_scene.RegionInfo.EstateSettings.AllowVoice = false; | 863 | Scene.RegionInfo.EstateSettings.AllowVoice = false; |
857 | 864 | ||
858 | if ((parms1 & 0x00100000) != 0) | 865 | if ((parms1 & 0x00100000) != 0) |
859 | m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = true; | 866 | Scene.RegionInfo.EstateSettings.AllowDirectTeleport = true; |
860 | else | 867 | else |
861 | m_scene.RegionInfo.EstateSettings.AllowDirectTeleport = false; | 868 | Scene.RegionInfo.EstateSettings.AllowDirectTeleport = false; |
862 | 869 | ||
863 | if ((parms1 & 0x00800000) != 0) | 870 | if ((parms1 & 0x00800000) != 0) |
864 | m_scene.RegionInfo.EstateSettings.DenyAnonymous = true; | 871 | Scene.RegionInfo.EstateSettings.DenyAnonymous = true; |
865 | else | 872 | else |
866 | m_scene.RegionInfo.EstateSettings.DenyAnonymous = false; | 873 | Scene.RegionInfo.EstateSettings.DenyAnonymous = false; |
867 | 874 | ||
868 | if ((parms1 & 0x01000000) != 0) | 875 | if ((parms1 & 0x01000000) != 0) |
869 | m_scene.RegionInfo.EstateSettings.DenyIdentified = true; | 876 | Scene.RegionInfo.EstateSettings.DenyIdentified = true; |
870 | else | 877 | else |
871 | m_scene.RegionInfo.EstateSettings.DenyIdentified = false; | 878 | Scene.RegionInfo.EstateSettings.DenyIdentified = false; |
872 | 879 | ||
873 | if ((parms1 & 0x02000000) != 0) | 880 | if ((parms1 & 0x02000000) != 0) |
874 | m_scene.RegionInfo.EstateSettings.DenyTransacted = true; | 881 | Scene.RegionInfo.EstateSettings.DenyTransacted = true; |
875 | else | 882 | else |
876 | m_scene.RegionInfo.EstateSettings.DenyTransacted = false; | 883 | Scene.RegionInfo.EstateSettings.DenyTransacted = false; |
877 | 884 | ||
878 | if ((parms1 & 0x40000000) != 0) | 885 | if ((parms1 & 0x40000000) != 0) |
879 | m_scene.RegionInfo.EstateSettings.DenyMinors = true; | 886 | Scene.RegionInfo.EstateSettings.DenyMinors = true; |
880 | else | 887 | else |
881 | m_scene.RegionInfo.EstateSettings.DenyMinors = false; | 888 | Scene.RegionInfo.EstateSettings.DenyMinors = false; |
882 | 889 | ||
883 | m_scene.RegionInfo.EstateSettings.Save(); | 890 | Scene.RegionInfo.EstateSettings.Save(); |
884 | TriggerEstateInfoChange(); | 891 | TriggerEstateInfoChange(); |
885 | 892 | ||
886 | m_scene.TriggerEstateSunUpdate(); | 893 | Scene.TriggerEstateSunUpdate(); |
887 | 894 | ||
888 | sendDetailedEstateData(remoteClient, invoice); | 895 | sendDetailedEstateData(remoteClient, invoice); |
889 | } | 896 | } |
@@ -891,137 +898,38 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
891 | #endregion | 898 | #endregion |
892 | 899 | ||
893 | #region IRegionModule Members | 900 | #region IRegionModule Members |
901 | |||
902 | public string Name { get { return "EstateManagementModule"; } } | ||
903 | |||
904 | public Type ReplaceableInterface { get { return null; } } | ||
894 | 905 | ||
895 | public void Initialise(Scene scene, IConfigSource source) | 906 | public void Initialise(IConfigSource source) {} |
896 | { | 907 | |
897 | m_scene = scene; | 908 | public void AddRegion(Scene scene) |
898 | m_scene.RegisterModuleInterface<IEstateModule>(this); | ||
899 | m_scene.EventManager.OnNewClient += EventManager_OnNewClient; | ||
900 | m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; | ||
901 | |||
902 | m_scene.AddCommand(this, "set terrain texture", | ||
903 | "set terrain texture <number> <uuid> [<x>] [<y>]", | ||
904 | "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " + | ||
905 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + | ||
906 | " that coordinate.", | ||
907 | consoleSetTerrainTexture); | ||
908 | |||
909 | m_scene.AddCommand(this, "set terrain heights", | ||
910 | "set terrain heights <corner> <min> <max> [<x>] [<y>]", | ||
911 | "Sets the terrain texture heights on corner #<corner> to <min>/<max>, if <x> or <y> are specified, it will only " + | ||
912 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + | ||
913 | " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.", | ||
914 | consoleSetTerrainHeights); | ||
915 | } | ||
916 | |||
917 | #region Console Commands | ||
918 | |||
919 | public void consoleSetTerrainTexture(string module, string[] args) | ||
920 | { | ||
921 | string num = args[3]; | ||
922 | string uuid = args[4]; | ||
923 | int x = (args.Length > 5 ? int.Parse(args[5]) : -1); | ||
924 | int y = (args.Length > 6 ? int.Parse(args[6]) : -1); | ||
925 | |||
926 | if (x == -1 || m_scene.RegionInfo.RegionLocX == x) | ||
927 | { | ||
928 | if (y == -1 || m_scene.RegionInfo.RegionLocY == y) | ||
929 | { | ||
930 | int corner = int.Parse(num); | ||
931 | UUID texture = UUID.Parse(uuid); | ||
932 | |||
933 | m_log.Debug("[ESTATEMODULE] Setting terrain textures for " + m_scene.RegionInfo.RegionName + | ||
934 | string.Format(" (C#{0} = {1})", corner, texture)); | ||
935 | |||
936 | switch (corner) | ||
937 | { | ||
938 | case 0: | ||
939 | m_scene.RegionInfo.RegionSettings.TerrainTexture1 = texture; | ||
940 | break; | ||
941 | case 1: | ||
942 | m_scene.RegionInfo.RegionSettings.TerrainTexture2 = texture; | ||
943 | break; | ||
944 | case 2: | ||
945 | m_scene.RegionInfo.RegionSettings.TerrainTexture3 = texture; | ||
946 | break; | ||
947 | case 3: | ||
948 | m_scene.RegionInfo.RegionSettings.TerrainTexture4 = texture; | ||
949 | break; | ||
950 | } | ||
951 | m_scene.RegionInfo.RegionSettings.Save(); | ||
952 | TriggerRegionInfoChange(); | ||
953 | sendRegionInfoPacketToAll(); | ||
954 | |||
955 | } | ||
956 | } | ||
957 | } | ||
958 | |||
959 | public void consoleSetTerrainHeights(string module, string[] args) | ||
960 | { | 909 | { |
961 | string num = args[3]; | 910 | Scene = scene; |
962 | string min = args[4]; | 911 | Scene.RegisterModuleInterface<IEstateModule>(this); |
963 | string max = args[5]; | 912 | Scene.EventManager.OnNewClient += EventManager_OnNewClient; |
964 | int x = (args.Length > 6 ? int.Parse(args[6]) : -1); | 913 | Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; |
965 | int y = (args.Length > 7 ? int.Parse(args[7]) : -1); | 914 | |
966 | 915 | m_commands = new EstateManagementCommands(this); | |
967 | if (x == -1 || m_scene.RegionInfo.RegionLocX == x) | 916 | m_commands.Initialise(); |
968 | { | ||
969 | if (y == -1 || m_scene.RegionInfo.RegionLocY == y) | ||
970 | { | ||
971 | int corner = int.Parse(num); | ||
972 | float lowValue = float.Parse(min, Culture.NumberFormatInfo); | ||
973 | float highValue = float.Parse(max, Culture.NumberFormatInfo); | ||
974 | |||
975 | m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + | ||
976 | string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); | ||
977 | |||
978 | switch (corner) | ||
979 | { | ||
980 | case 0: | ||
981 | m_scene.RegionInfo.RegionSettings.Elevation1SW = lowValue; | ||
982 | m_scene.RegionInfo.RegionSettings.Elevation2SW = highValue; | ||
983 | break; | ||
984 | case 1: | ||
985 | m_scene.RegionInfo.RegionSettings.Elevation1NW = lowValue; | ||
986 | m_scene.RegionInfo.RegionSettings.Elevation2NW = highValue; | ||
987 | break; | ||
988 | case 2: | ||
989 | m_scene.RegionInfo.RegionSettings.Elevation1SE = lowValue; | ||
990 | m_scene.RegionInfo.RegionSettings.Elevation2SE = highValue; | ||
991 | break; | ||
992 | case 3: | ||
993 | m_scene.RegionInfo.RegionSettings.Elevation1NE = lowValue; | ||
994 | m_scene.RegionInfo.RegionSettings.Elevation2NE = highValue; | ||
995 | break; | ||
996 | } | ||
997 | m_scene.RegionInfo.RegionSettings.Save(); | ||
998 | TriggerRegionInfoChange(); | ||
999 | sendRegionHandshakeToAll(); | ||
1000 | } | ||
1001 | } | ||
1002 | } | 917 | } |
1003 | 918 | ||
1004 | #endregion | 919 | public void RemoveRegion(Scene scene) {} |
1005 | 920 | ||
1006 | public void PostInitialise() | 921 | public void RegionLoaded(Scene scene) |
1007 | { | 922 | { |
1008 | // Sets up the sun module based no the saved Estate and Region Settings | 923 | // Sets up the sun module based no the saved Estate and Region Settings |
1009 | // DO NOT REMOVE or the sun will stop working | 924 | // DO NOT REMOVE or the sun will stop working |
1010 | m_scene.TriggerEstateSunUpdate(); | 925 | scene.TriggerEstateSunUpdate(); |
1011 | } | 926 | |
1012 | 927 | UserManager = scene.RequestModuleInterface<IUserManagement>(); | |
1013 | public void Close() | ||
1014 | { | ||
1015 | } | ||
1016 | |||
1017 | public string Name | ||
1018 | { | ||
1019 | get { return "EstateManagementModule"; } | ||
1020 | } | 928 | } |
1021 | 929 | ||
1022 | public bool IsSharedModule | 930 | public void Close() |
1023 | { | 931 | { |
1024 | get { return false; } | 932 | m_commands.Close(); |
1025 | } | 933 | } |
1026 | 934 | ||
1027 | #endregion | 935 | #endregion |
@@ -1031,14 +939,14 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1031 | public void changeWaterHeight(float height) | 939 | public void changeWaterHeight(float height) |
1032 | { | 940 | { |
1033 | setRegionTerrainSettings(height, | 941 | setRegionTerrainSettings(height, |
1034 | (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit, | 942 | (float)Scene.RegionInfo.RegionSettings.TerrainRaiseLimit, |
1035 | (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit, | 943 | (float)Scene.RegionInfo.RegionSettings.TerrainLowerLimit, |
1036 | m_scene.RegionInfo.RegionSettings.UseEstateSun, | 944 | Scene.RegionInfo.RegionSettings.UseEstateSun, |
1037 | m_scene.RegionInfo.RegionSettings.FixedSun, | 945 | Scene.RegionInfo.RegionSettings.FixedSun, |
1038 | (float)m_scene.RegionInfo.RegionSettings.SunPosition, | 946 | (float)Scene.RegionInfo.RegionSettings.SunPosition, |
1039 | m_scene.RegionInfo.EstateSettings.UseGlobalTime, | 947 | Scene.RegionInfo.EstateSettings.UseGlobalTime, |
1040 | m_scene.RegionInfo.EstateSettings.FixedSun, | 948 | Scene.RegionInfo.EstateSettings.FixedSun, |
1041 | (float)m_scene.RegionInfo.EstateSettings.SunPosition); | 949 | (float)Scene.RegionInfo.EstateSettings.SunPosition); |
1042 | 950 | ||
1043 | sendRegionInfoPacketToAll(); | 951 | sendRegionInfoPacketToAll(); |
1044 | } | 952 | } |
@@ -1078,32 +986,32 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1078 | 986 | ||
1079 | // Fully implemented | 987 | // Fully implemented |
1080 | // | 988 | // |
1081 | if (m_scene.RegionInfo.RegionSettings.AllowDamage) | 989 | if (Scene.RegionInfo.RegionSettings.AllowDamage) |
1082 | flags |= RegionFlags.AllowDamage; | 990 | flags |= RegionFlags.AllowDamage; |
1083 | if (m_scene.RegionInfo.RegionSettings.BlockTerraform) | 991 | if (Scene.RegionInfo.RegionSettings.BlockTerraform) |
1084 | flags |= RegionFlags.BlockTerraform; | 992 | flags |= RegionFlags.BlockTerraform; |
1085 | if (!m_scene.RegionInfo.RegionSettings.AllowLandResell) | 993 | if (!Scene.RegionInfo.RegionSettings.AllowLandResell) |
1086 | flags |= RegionFlags.BlockLandResell; | 994 | flags |= RegionFlags.BlockLandResell; |
1087 | if (m_scene.RegionInfo.RegionSettings.DisableCollisions) | 995 | if (Scene.RegionInfo.RegionSettings.DisableCollisions) |
1088 | flags |= RegionFlags.SkipCollisions; | 996 | flags |= RegionFlags.SkipCollisions; |
1089 | if (m_scene.RegionInfo.RegionSettings.DisableScripts) | 997 | if (Scene.RegionInfo.RegionSettings.DisableScripts) |
1090 | flags |= RegionFlags.SkipScripts; | 998 | flags |= RegionFlags.SkipScripts; |
1091 | if (m_scene.RegionInfo.RegionSettings.DisablePhysics) | 999 | if (Scene.RegionInfo.RegionSettings.DisablePhysics) |
1092 | flags |= RegionFlags.SkipPhysics; | 1000 | flags |= RegionFlags.SkipPhysics; |
1093 | if (m_scene.RegionInfo.RegionSettings.BlockFly) | 1001 | if (Scene.RegionInfo.RegionSettings.BlockFly) |
1094 | flags |= RegionFlags.NoFly; | 1002 | flags |= RegionFlags.NoFly; |
1095 | if (m_scene.RegionInfo.RegionSettings.RestrictPushing) | 1003 | if (Scene.RegionInfo.RegionSettings.RestrictPushing) |
1096 | flags |= RegionFlags.RestrictPushObject; | 1004 | flags |= RegionFlags.RestrictPushObject; |
1097 | if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide) | 1005 | if (Scene.RegionInfo.RegionSettings.AllowLandJoinDivide) |
1098 | flags |= RegionFlags.AllowParcelChanges; | 1006 | flags |= RegionFlags.AllowParcelChanges; |
1099 | if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch) | 1007 | if (Scene.RegionInfo.RegionSettings.BlockShowInSearch) |
1100 | flags |= RegionFlags.BlockParcelSearch; | 1008 | flags |= RegionFlags.BlockParcelSearch; |
1101 | 1009 | ||
1102 | if (m_scene.RegionInfo.RegionSettings.FixedSun) | 1010 | if (Scene.RegionInfo.RegionSettings.FixedSun) |
1103 | flags |= RegionFlags.SunFixed; | 1011 | flags |= RegionFlags.SunFixed; |
1104 | if (m_scene.RegionInfo.RegionSettings.Sandbox) | 1012 | if (Scene.RegionInfo.RegionSettings.Sandbox) |
1105 | flags |= RegionFlags.Sandbox; | 1013 | flags |= RegionFlags.Sandbox; |
1106 | if (m_scene.RegionInfo.EstateSettings.AllowVoice) | 1014 | if (Scene.RegionInfo.EstateSettings.AllowVoice) |
1107 | flags |= RegionFlags.AllowVoice; | 1015 | flags |= RegionFlags.AllowVoice; |
1108 | 1016 | ||
1109 | // Fudge these to always on, so the menu options activate | 1017 | // Fudge these to always on, so the menu options activate |
@@ -1125,32 +1033,32 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1125 | { | 1033 | { |
1126 | RegionFlags flags = RegionFlags.None; | 1034 | RegionFlags flags = RegionFlags.None; |
1127 | 1035 | ||
1128 | if (m_scene.RegionInfo.EstateSettings.FixedSun) | 1036 | if (Scene.RegionInfo.EstateSettings.FixedSun) |
1129 | flags |= RegionFlags.SunFixed; | 1037 | flags |= RegionFlags.SunFixed; |
1130 | if (m_scene.RegionInfo.EstateSettings.PublicAccess) | 1038 | if (Scene.RegionInfo.EstateSettings.PublicAccess) |
1131 | flags |= (RegionFlags.PublicAllowed | | 1039 | flags |= (RegionFlags.PublicAllowed | |
1132 | RegionFlags.ExternallyVisible); | 1040 | RegionFlags.ExternallyVisible); |
1133 | if (m_scene.RegionInfo.EstateSettings.AllowVoice) | 1041 | if (Scene.RegionInfo.EstateSettings.AllowVoice) |
1134 | flags |= RegionFlags.AllowVoice; | 1042 | flags |= RegionFlags.AllowVoice; |
1135 | if (m_scene.RegionInfo.EstateSettings.AllowDirectTeleport) | 1043 | if (Scene.RegionInfo.EstateSettings.AllowDirectTeleport) |
1136 | flags |= RegionFlags.AllowDirectTeleport; | 1044 | flags |= RegionFlags.AllowDirectTeleport; |
1137 | if (m_scene.RegionInfo.EstateSettings.DenyAnonymous) | 1045 | if (Scene.RegionInfo.EstateSettings.DenyAnonymous) |
1138 | flags |= RegionFlags.DenyAnonymous; | 1046 | flags |= RegionFlags.DenyAnonymous; |
1139 | if (m_scene.RegionInfo.EstateSettings.DenyIdentified) | 1047 | if (Scene.RegionInfo.EstateSettings.DenyIdentified) |
1140 | flags |= RegionFlags.DenyIdentified; | 1048 | flags |= RegionFlags.DenyIdentified; |
1141 | if (m_scene.RegionInfo.EstateSettings.DenyTransacted) | 1049 | if (Scene.RegionInfo.EstateSettings.DenyTransacted) |
1142 | flags |= RegionFlags.DenyTransacted; | 1050 | flags |= RegionFlags.DenyTransacted; |
1143 | if (m_scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner) | 1051 | if (Scene.RegionInfo.EstateSettings.AbuseEmailToEstateOwner) |
1144 | flags |= RegionFlags.AbuseEmailToEstateOwner; | 1052 | flags |= RegionFlags.AbuseEmailToEstateOwner; |
1145 | if (m_scene.RegionInfo.EstateSettings.BlockDwell) | 1053 | if (Scene.RegionInfo.EstateSettings.BlockDwell) |
1146 | flags |= RegionFlags.BlockDwell; | 1054 | flags |= RegionFlags.BlockDwell; |
1147 | if (m_scene.RegionInfo.EstateSettings.EstateSkipScripts) | 1055 | if (Scene.RegionInfo.EstateSettings.EstateSkipScripts) |
1148 | flags |= RegionFlags.EstateSkipScripts; | 1056 | flags |= RegionFlags.EstateSkipScripts; |
1149 | if (m_scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) | 1057 | if (Scene.RegionInfo.EstateSettings.ResetHomeOnTeleport) |
1150 | flags |= RegionFlags.ResetHomeOnTeleport; | 1058 | flags |= RegionFlags.ResetHomeOnTeleport; |
1151 | if (m_scene.RegionInfo.EstateSettings.TaxFree) | 1059 | if (Scene.RegionInfo.EstateSettings.TaxFree) |
1152 | flags |= RegionFlags.TaxFree; | 1060 | flags |= RegionFlags.TaxFree; |
1153 | if (m_scene.RegionInfo.EstateSettings.DenyMinors) | 1061 | if (Scene.RegionInfo.EstateSettings.DenyMinors) |
1154 | flags |= (RegionFlags)(1 << 30); | 1062 | flags |= (RegionFlags)(1 << 30); |
1155 | 1063 | ||
1156 | return (uint)flags; | 1064 | return (uint)flags; |
@@ -1158,38 +1066,38 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1158 | 1066 | ||
1159 | public bool IsManager(UUID avatarID) | 1067 | public bool IsManager(UUID avatarID) |
1160 | { | 1068 | { |
1161 | if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner) | 1069 | if (avatarID == Scene.RegionInfo.EstateSettings.EstateOwner) |
1162 | return true; | 1070 | return true; |
1163 | 1071 | ||
1164 | List<UUID> ems = new List<UUID>(m_scene.RegionInfo.EstateSettings.EstateManagers); | 1072 | List<UUID> ems = new List<UUID>(Scene.RegionInfo.EstateSettings.EstateManagers); |
1165 | if (ems.Contains(avatarID)) | 1073 | if (ems.Contains(avatarID)) |
1166 | return true; | 1074 | return true; |
1167 | 1075 | ||
1168 | return false; | 1076 | return false; |
1169 | } | 1077 | } |
1170 | 1078 | ||
1171 | protected void TriggerRegionInfoChange() | 1079 | public void TriggerRegionInfoChange() |
1172 | { | 1080 | { |
1173 | ChangeDelegate change = OnRegionInfoChange; | 1081 | ChangeDelegate change = OnRegionInfoChange; |
1174 | 1082 | ||
1175 | if (change != null) | 1083 | if (change != null) |
1176 | change(m_scene.RegionInfo.RegionID); | 1084 | change(Scene.RegionInfo.RegionID); |
1177 | } | 1085 | } |
1178 | 1086 | ||
1179 | protected void TriggerEstateInfoChange() | 1087 | public void TriggerEstateInfoChange() |
1180 | { | 1088 | { |
1181 | ChangeDelegate change = OnEstateInfoChange; | 1089 | ChangeDelegate change = OnEstateInfoChange; |
1182 | 1090 | ||
1183 | if (change != null) | 1091 | if (change != null) |
1184 | change(m_scene.RegionInfo.RegionID); | 1092 | change(Scene.RegionInfo.RegionID); |
1185 | } | 1093 | } |
1186 | 1094 | ||
1187 | protected void TriggerEstateMessage(UUID fromID, string fromName, string message) | 1095 | public void TriggerEstateMessage(UUID fromID, string fromName, string message) |
1188 | { | 1096 | { |
1189 | MessageDelegate onmessage = OnEstateMessage; | 1097 | MessageDelegate onmessage = OnEstateMessage; |
1190 | 1098 | ||
1191 | if (onmessage != null) | 1099 | if (onmessage != null) |
1192 | onmessage(m_scene.RegionInfo.RegionID, fromID, fromName, message); | 1100 | onmessage(Scene.RegionInfo.RegionID, fromID, fromName, message); |
1193 | } | 1101 | } |
1194 | } | 1102 | } |
1195 | } | 1103 | } |