aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs24
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs149
-rw-r--r--OpenSim/Region/CoreModules/World/Sun/SunModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEstateDataService.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs3
6 files changed, 183 insertions, 11 deletions
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;
33using OpenSim.Region.Framework.Interfaces; 33using OpenSim.Region.Framework.Interfaces;
34using OpenSim.Region.Framework.Scenes; 34using OpenSim.Region.Framework.Scenes;
35 35
36[assembly: Addin("BareBonesSharedModule", "0.1")]
37[assembly: AddinDependency("OpenSim", "0.5")]
38
36namespace OpenSim.Region.OptionalModules.Example.BareBonesShared 39namespace OpenSim.Region.OptionalModules.Example.BareBonesShared
37{ 40{
38 /// <summary> 41 /// <summary>