diff options
author | Justin Clark-Casey (justincc) | 2011-04-05 01:30:13 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-04-05 01:30:13 +0100 |
commit | f58941e89f122c2e1fd54a2f817fb8114e6c80ed (patch) | |
tree | bead2efefc5ffccd858429b82933ada2c4390735 /OpenSim | |
parent | Implement rezzing coalesced objects (diff) | |
download | opensim-SC-f58941e89f122c2e1fd54a2f817fb8114e6c80ed.zip opensim-SC-f58941e89f122c2e1fd54a2f817fb8114e6c80ed.tar.gz opensim-SC-f58941e89f122c2e1fd54a2f817fb8114e6c80ed.tar.bz2 opensim-SC-f58941e89f122c2e1fd54a2f817fb8114e6c80ed.tar.xz |
Make the "All Estates" option work from the client (this makes chosen changes to all the estates that the user owns).
This applies to adding/removing estate users, groups, managers and bans.
This is the application of the AllEstates_0.5.patch from http://opensimulator.org/mantis/view.php?id=5420
Thanks very much, Snoopy!
Diffstat (limited to '')
11 files changed, 268 insertions, 12 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLEstateData.cs b/OpenSim/Data/MSSQL/MSSQLEstateData.cs index 92a8d80..d10ebe4 100644 --- a/OpenSim/Data/MSSQL/MSSQLEstateData.cs +++ b/OpenSim/Data/MSSQL/MSSQLEstateData.cs | |||
@@ -372,6 +372,11 @@ namespace OpenSim.Data.MSSQL | |||
372 | return new List<int>(); | 372 | return new List<int>(); |
373 | } | 373 | } |
374 | 374 | ||
375 | public List<int> GetEstatesByOwner(UUID ownerID) | ||
376 | { | ||
377 | return new List<int>(); | ||
378 | } | ||
379 | |||
375 | public bool LinkRegion(UUID regionID, int estateID) | 380 | public bool LinkRegion(UUID regionID, int estateID) |
376 | { | 381 | { |
377 | // TODO: Implementation! | 382 | // TODO: Implementation! |
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 6d72e82..86416d1 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs | |||
@@ -484,6 +484,36 @@ namespace OpenSim.Data.MySQL | |||
484 | return result; | 484 | return result; |
485 | } | 485 | } |
486 | 486 | ||
487 | public List<int> GetEstatesByOwner(UUID ownerID) | ||
488 | { | ||
489 | List<int> result = new List<int>(); | ||
490 | |||
491 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | ||
492 | { | ||
493 | dbcon.Open(); | ||
494 | |||
495 | using (MySqlCommand cmd = dbcon.CreateCommand()) | ||
496 | { | ||
497 | cmd.CommandText = "select estateID from estate_settings where EstateOwner = ?EstateOwner"; | ||
498 | cmd.Parameters.AddWithValue("?EstateOwner", ownerID); | ||
499 | |||
500 | using (IDataReader reader = cmd.ExecuteReader()) | ||
501 | { | ||
502 | while (reader.Read()) | ||
503 | { | ||
504 | result.Add(Convert.ToInt32(reader["EstateID"])); | ||
505 | } | ||
506 | reader.Close(); | ||
507 | } | ||
508 | } | ||
509 | |||
510 | |||
511 | dbcon.Close(); | ||
512 | } | ||
513 | |||
514 | return result; | ||
515 | } | ||
516 | |||
487 | public bool LinkRegion(UUID regionID, int estateID) | 517 | public bool LinkRegion(UUID regionID, int estateID) |
488 | { | 518 | { |
489 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 519 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs index 6afc540..2f05a6e 100644 --- a/OpenSim/Data/SQLite/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs | |||
@@ -412,6 +412,28 @@ namespace OpenSim.Data.SQLite | |||
412 | return result; | 412 | return result; |
413 | } | 413 | } |
414 | 414 | ||
415 | public List<int> GetEstatesByOwner(UUID ownerID) | ||
416 | { | ||
417 | List<int> result = new List<int>(); | ||
418 | |||
419 | string sql = "select EstateID from estate_settings where estate_settings.EstateOwner = :EstateOwner"; | ||
420 | |||
421 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); | ||
422 | |||
423 | cmd.CommandText = sql; | ||
424 | cmd.Parameters.AddWithValue(":EstateOwner", ownerID); | ||
425 | |||
426 | IDataReader r = cmd.ExecuteReader(); | ||
427 | |||
428 | while (r.Read()) | ||
429 | { | ||
430 | result.Add(Convert.ToInt32(r["EstateID"])); | ||
431 | } | ||
432 | r.Close(); | ||
433 | |||
434 | return result; | ||
435 | } | ||
436 | |||
415 | public bool LinkRegion(UUID regionID, int estateID) | 437 | public bool LinkRegion(UUID regionID, int estateID) |
416 | { | 438 | { |
417 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); | 439 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); |
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs index ad28c00..4dd225f 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | |||
@@ -401,7 +401,29 @@ namespace OpenSim.Data.SQLiteLegacy | |||
401 | 401 | ||
402 | return result; | 402 | return result; |
403 | } | 403 | } |
404 | 404 | ||
405 | public List<int> GetEstatesByOwner(UUID ownerID) | ||
406 | { | ||
407 | List<int> result = new List<int>(); | ||
408 | |||
409 | string sql = "select EstateID from estate_settings where estate_settings.EstateOwner = :EstateOwner"; | ||
410 | |||
411 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); | ||
412 | |||
413 | cmd.CommandText = sql; | ||
414 | cmd.Parameters.Add(":EstateOwner", ownerID); | ||
415 | |||
416 | IDataReader r = cmd.ExecuteReader(); | ||
417 | |||
418 | while (r.Read()) | ||
419 | { | ||
420 | result.Add(Convert.ToInt32(r["EstateID"])); | ||
421 | } | ||
422 | r.Close(); | ||
423 | |||
424 | return result; | ||
425 | } | ||
426 | |||
405 | public bool LinkRegion(UUID regionID, int estateID) | 427 | public bool LinkRegion(UUID regionID, int estateID) |
406 | { | 428 | { |
407 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); | 429 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 2faffae..f8a0e07 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -8809,13 +8809,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8809 | case "instantmessage": | 8809 | case "instantmessage": |
8810 | if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) | 8810 | if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) |
8811 | { | 8811 | { |
8812 | if (messagePacket.ParamList.Length < 5) | 8812 | if (messagePacket.ParamList.Length < 2) |
8813 | return true; | 8813 | return true; |
8814 | |||
8814 | UUID invoice = messagePacket.MethodData.Invoice; | 8815 | UUID invoice = messagePacket.MethodData.Invoice; |
8815 | UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); | ||
8816 | string SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter); | ||
8817 | string Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter); | ||
8818 | UUID sessionID = messagePacket.AgentData.SessionID; | 8816 | UUID sessionID = messagePacket.AgentData.SessionID; |
8817 | |||
8818 | UUID SenderID; | ||
8819 | string SenderName; | ||
8820 | string Message; | ||
8821 | |||
8822 | if (messagePacket.ParamList.Length < 5) | ||
8823 | { | ||
8824 | SenderID = AgentId; | ||
8825 | SenderName = Utils.BytesToString(messagePacket.ParamList[0].Parameter); | ||
8826 | Message = Utils.BytesToString(messagePacket.ParamList[1].Parameter); | ||
8827 | } | ||
8828 | else | ||
8829 | { | ||
8830 | SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); | ||
8831 | SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter); | ||
8832 | Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter); | ||
8833 | } | ||
8834 | |||
8819 | OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); | 8835 | OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message); |
8820 | } | 8836 | } |
8821 | return true; | 8837 | return true; |
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 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs index 38c10a6..7066cf2 100644 --- a/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs +++ b/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs | |||
@@ -71,6 +71,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
71 | List<int> GetEstates(string search); | 71 | List<int> GetEstates(string search); |
72 | 72 | ||
73 | /// <summary> | 73 | /// <summary> |
74 | /// Get the IDs of all estates owned by the given user. | ||
75 | /// </summary> | ||
76 | /// <returns>An empty list if no estates were found.</returns> | ||
77 | List<int> GetEstatesByOwner(UUID ownerID); | ||
78 | |||
79 | /// <summary> | ||
74 | /// Get the IDs of all estates. | 80 | /// Get the IDs of all estates. |
75 | /// </summary> | 81 | /// </summary> |
76 | /// <returns>An empty list if no estates were found.</returns> | 82 | /// <returns>An empty list if no estates were found.</returns> |
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs index c82661d..d790a30 100644 --- a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs +++ b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs | |||
@@ -74,6 +74,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
74 | /// <param name="search">Name of estate to search for. This is the exact name, no parttern matching is done.</param> | 74 | /// <param name="search">Name of estate to search for. This is the exact name, no parttern matching is done.</param> |
75 | /// <returns></returns> | 75 | /// <returns></returns> |
76 | List<int> GetEstates(string search); | 76 | List<int> GetEstates(string search); |
77 | |||
78 | /// <summary> | ||
79 | /// Get the IDs of all estates owned by the given user. | ||
80 | /// </summary> | ||
81 | /// <returns>An empty list if no estates were found.</returns> | ||
82 | List<int> GetEstatesByOwner(UUID ownerID); | ||
77 | 83 | ||
78 | /// <summary> | 84 | /// <summary> |
79 | /// Get the IDs of all estates. | 85 | /// Get the IDs of all estates. |
diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs index 781fe95..dddea3e 100644 --- a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs +++ b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs | |||
@@ -33,6 +33,9 @@ using Nini.Config; | |||
33 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |
34 | using OpenSim.Region.Framework.Scenes; | 34 | using OpenSim.Region.Framework.Scenes; |
35 | 35 | ||
36 | [assembly: Addin("BareBonesSharedModule", "0.1")] | ||
37 | [assembly: AddinDependency("OpenSim", "0.5")] | ||
38 | |||
36 | namespace OpenSim.Region.OptionalModules.Example.BareBonesShared | 39 | namespace OpenSim.Region.OptionalModules.Example.BareBonesShared |
37 | { | 40 | { |
38 | /// <summary> | 41 | /// <summary> |
diff --git a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs index d0588bf..7184ba1 100644 --- a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs +++ b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs | |||
@@ -111,6 +111,11 @@ namespace OpenSim.Services.Connectors | |||
111 | return m_database.GetEstatesAll(); | 111 | return m_database.GetEstatesAll(); |
112 | } | 112 | } |
113 | 113 | ||
114 | public List<int> GetEstatesByOwner(UUID ownerID) | ||
115 | { | ||
116 | return m_database.GetEstatesByOwner(ownerID); | ||
117 | } | ||
118 | |||
114 | public bool LinkRegion(UUID regionID, int estateID) | 119 | public bool LinkRegion(UUID regionID, int estateID) |
115 | { | 120 | { |
116 | return m_database.LinkRegion(regionID, estateID); | 121 | return m_database.LinkRegion(regionID, estateID); |