diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 149 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Sun/SunModule.cs | 6 |
2 files changed, 148 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 57ab135..b6d64ac 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -200,12 +200,13 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
200 | } | 200 | } |
201 | Scene.RegionInfo.RegionSettings.Save(); | 201 | Scene.RegionInfo.RegionSettings.Save(); |
202 | TriggerRegionInfoChange(); | 202 | TriggerRegionInfoChange(); |
203 | sendRegionHandshakeToAll(); | ||
203 | sendRegionInfoPacketToAll(); | 204 | sendRegionInfoPacketToAll(); |
204 | } | 205 | } |
205 | 206 | ||
206 | private void handleCommitEstateTerrainTextureRequest(IClientAPI remoteClient) | 207 | private void handleCommitEstateTerrainTextureRequest(IClientAPI remoteClient) |
207 | { | 208 | { |
208 | sendRegionHandshakeToAll(); | 209 | // sendRegionHandshakeToAll(); |
209 | } | 210 | } |
210 | 211 | ||
211 | public void setRegionTerrainSettings(float WaterHeight, | 212 | public void setRegionTerrainSettings(float WaterHeight, |
@@ -274,8 +275,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
274 | { | 275 | { |
275 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 276 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
276 | { | 277 | { |
278 | if ((estateAccessType & 1) != 0) // All estates | ||
279 | { | ||
280 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
281 | EstateSettings estateSettings; | ||
282 | |||
283 | foreach (int estateID in estateIDs) | ||
284 | { | ||
285 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
286 | { | ||
287 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
288 | estateSettings.AddEstateUser(user); | ||
289 | estateSettings.Save(); | ||
290 | } | ||
291 | } | ||
292 | } | ||
293 | |||
277 | Scene.RegionInfo.EstateSettings.AddEstateUser(user); | 294 | Scene.RegionInfo.EstateSettings.AddEstateUser(user); |
278 | Scene.RegionInfo.EstateSettings.Save(); | 295 | Scene.RegionInfo.EstateSettings.Save(); |
296 | |||
279 | TriggerEstateInfoChange(); | 297 | TriggerEstateInfoChange(); |
280 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); | 298 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); |
281 | } | 299 | } |
@@ -289,10 +307,26 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
289 | { | 307 | { |
290 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 308 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
291 | { | 309 | { |
310 | if ((estateAccessType & 1) != 0) // All estates | ||
311 | { | ||
312 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
313 | EstateSettings estateSettings; | ||
314 | |||
315 | foreach (int estateID in estateIDs) | ||
316 | { | ||
317 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
318 | { | ||
319 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
320 | estateSettings.RemoveEstateUser(user); | ||
321 | estateSettings.Save(); | ||
322 | } | ||
323 | } | ||
324 | } | ||
325 | |||
292 | Scene.RegionInfo.EstateSettings.RemoveEstateUser(user); | 326 | Scene.RegionInfo.EstateSettings.RemoveEstateUser(user); |
293 | Scene.RegionInfo.EstateSettings.Save(); | 327 | Scene.RegionInfo.EstateSettings.Save(); |
294 | TriggerEstateInfoChange(); | ||
295 | 328 | ||
329 | TriggerEstateInfoChange(); | ||
296 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); | 330 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, Scene.RegionInfo.EstateSettings.EstateAccess, Scene.RegionInfo.EstateSettings.EstateID); |
297 | } | 331 | } |
298 | else | 332 | else |
@@ -304,8 +338,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
304 | { | 338 | { |
305 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 339 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
306 | { | 340 | { |
341 | if ((estateAccessType & 1) != 0) // All estates | ||
342 | { | ||
343 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
344 | EstateSettings estateSettings; | ||
345 | |||
346 | foreach (int estateID in estateIDs) | ||
347 | { | ||
348 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
349 | { | ||
350 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
351 | estateSettings.AddEstateGroup(user); | ||
352 | estateSettings.Save(); | ||
353 | } | ||
354 | } | ||
355 | } | ||
356 | |||
307 | Scene.RegionInfo.EstateSettings.AddEstateGroup(user); | 357 | Scene.RegionInfo.EstateSettings.AddEstateGroup(user); |
308 | Scene.RegionInfo.EstateSettings.Save(); | 358 | Scene.RegionInfo.EstateSettings.Save(); |
359 | |||
309 | TriggerEstateInfoChange(); | 360 | TriggerEstateInfoChange(); |
310 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); | 361 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); |
311 | } | 362 | } |
@@ -318,10 +369,26 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
318 | { | 369 | { |
319 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 370 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
320 | { | 371 | { |
372 | if ((estateAccessType & 1) != 0) // All estates | ||
373 | { | ||
374 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
375 | EstateSettings estateSettings; | ||
376 | |||
377 | foreach (int estateID in estateIDs) | ||
378 | { | ||
379 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
380 | { | ||
381 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
382 | estateSettings.RemoveEstateGroup(user); | ||
383 | estateSettings.Save(); | ||
384 | } | ||
385 | } | ||
386 | } | ||
387 | |||
321 | Scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); | 388 | Scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); |
322 | Scene.RegionInfo.EstateSettings.Save(); | 389 | Scene.RegionInfo.EstateSettings.Save(); |
323 | TriggerEstateInfoChange(); | ||
324 | 390 | ||
391 | TriggerEstateInfoChange(); | ||
325 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); | 392 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, Scene.RegionInfo.EstateSettings.EstateGroups, Scene.RegionInfo.EstateSettings.EstateID); |
326 | } | 393 | } |
327 | else | 394 | else |
@@ -349,6 +416,29 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
349 | if (!alreadyInList) | 416 | if (!alreadyInList) |
350 | { | 417 | { |
351 | 418 | ||
419 | if ((estateAccessType & 1) != 0) // All estates | ||
420 | { | ||
421 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
422 | EstateSettings estateSettings; | ||
423 | |||
424 | foreach (int estateID in estateIDs) | ||
425 | { | ||
426 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
427 | { | ||
428 | EstateBan bitem = new EstateBan(); | ||
429 | |||
430 | bitem.BannedUserID = user; | ||
431 | bitem.EstateID = (uint)estateID; | ||
432 | bitem.BannedHostAddress = "0.0.0.0"; | ||
433 | bitem.BannedHostIPMask = "0.0.0.0"; | ||
434 | |||
435 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
436 | estateSettings.AddBan(bitem); | ||
437 | estateSettings.Save(); | ||
438 | } | ||
439 | } | ||
440 | } | ||
441 | |||
352 | EstateBan item = new EstateBan(); | 442 | EstateBan item = new EstateBan(); |
353 | 443 | ||
354 | item.BannedUserID = user; | 444 | item.BannedUserID = user; |
@@ -358,6 +448,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
358 | 448 | ||
359 | Scene.RegionInfo.EstateSettings.AddBan(item); | 449 | Scene.RegionInfo.EstateSettings.AddBan(item); |
360 | Scene.RegionInfo.EstateSettings.Save(); | 450 | Scene.RegionInfo.EstateSettings.Save(); |
451 | |||
361 | TriggerEstateInfoChange(); | 452 | TriggerEstateInfoChange(); |
362 | 453 | ||
363 | ScenePresence s = Scene.GetScenePresence(user); | 454 | ScenePresence s = Scene.GetScenePresence(user); |
@@ -403,8 +494,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
403 | 494 | ||
404 | if (alreadyInList && listitem != null) | 495 | if (alreadyInList && listitem != null) |
405 | { | 496 | { |
497 | if ((estateAccessType & 1) != 0) // All estates | ||
498 | { | ||
499 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
500 | EstateSettings estateSettings; | ||
501 | |||
502 | foreach (int estateID in estateIDs) | ||
503 | { | ||
504 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
505 | { | ||
506 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
507 | estateSettings.RemoveBan(user); | ||
508 | estateSettings.Save(); | ||
509 | } | ||
510 | } | ||
511 | } | ||
512 | |||
406 | Scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); | 513 | Scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); |
407 | Scene.RegionInfo.EstateSettings.Save(); | 514 | Scene.RegionInfo.EstateSettings.Save(); |
515 | |||
408 | TriggerEstateInfoChange(); | 516 | TriggerEstateInfoChange(); |
409 | } | 517 | } |
410 | else | 518 | else |
@@ -424,8 +532,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
424 | { | 532 | { |
425 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 533 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
426 | { | 534 | { |
535 | if ((estateAccessType & 1) != 0) // All estates | ||
536 | { | ||
537 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
538 | EstateSettings estateSettings; | ||
539 | |||
540 | foreach (int estateID in estateIDs) | ||
541 | { | ||
542 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
543 | { | ||
544 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
545 | estateSettings.AddEstateManager(user); | ||
546 | estateSettings.Save(); | ||
547 | } | ||
548 | } | ||
549 | } | ||
550 | |||
427 | Scene.RegionInfo.EstateSettings.AddEstateManager(user); | 551 | Scene.RegionInfo.EstateSettings.AddEstateManager(user); |
428 | Scene.RegionInfo.EstateSettings.Save(); | 552 | Scene.RegionInfo.EstateSettings.Save(); |
553 | |||
429 | TriggerEstateInfoChange(); | 554 | TriggerEstateInfoChange(); |
430 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); | 555 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); |
431 | } | 556 | } |
@@ -438,10 +563,26 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
438 | { | 563 | { |
439 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) | 564 | if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || Scene.Permissions.BypassPermissions()) |
440 | { | 565 | { |
566 | if ((estateAccessType & 1) != 0) // All estates | ||
567 | { | ||
568 | List<int> estateIDs = Scene.EstateDataService.GetEstatesByOwner(Scene.RegionInfo.EstateSettings.EstateOwner); | ||
569 | EstateSettings estateSettings; | ||
570 | |||
571 | foreach (int estateID in estateIDs) | ||
572 | { | ||
573 | if (estateID != Scene.RegionInfo.EstateSettings.EstateID) | ||
574 | { | ||
575 | estateSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
576 | estateSettings.RemoveEstateManager(user); | ||
577 | estateSettings.Save(); | ||
578 | } | ||
579 | } | ||
580 | } | ||
581 | |||
441 | Scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | 582 | Scene.RegionInfo.EstateSettings.RemoveEstateManager(user); |
442 | Scene.RegionInfo.EstateSettings.Save(); | 583 | Scene.RegionInfo.EstateSettings.Save(); |
443 | TriggerEstateInfoChange(); | ||
444 | 584 | ||
585 | TriggerEstateInfoChange(); | ||
445 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); | 586 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, Scene.RegionInfo.EstateSettings.EstateManagers, Scene.RegionInfo.EstateSettings.EstateID); |
446 | } | 587 | } |
447 | else | 588 | else |
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 | ||