aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/EstateSettings.cs61
1 files changed, 58 insertions, 3 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index 1078c10..9e4b9a4 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -646,8 +646,8 @@ namespace OpenSim.Framework
646 for (int i = 0; i < numEstateManagers; i++) 646 for (int i = 0; i < numEstateManagers; i++)
647 { 647 {
648 pos = GetNextEstateManager(pos); 648 pos = GetNextEstateManager(pos);
649 649
650 rEstateManagers[i] = GetEstateManagerAtPos(pos); 650 rEstateManagers[i] = GetEstateManagerAtPos(pos); pos++;
651 651
652 } 652 }
653 return rEstateManagers; 653 return rEstateManagers;
@@ -683,8 +683,63 @@ namespace OpenSim.Framework
683 return numEstateManagers; 683 return numEstateManagers;
684 } 684 }
685 685
686 public void AddEstateManager(LLUUID avatarID)
687 {
688 LLUUID[] testateManagers = GetEstateManagers();
689 LLUUID[] nestateManagers = new LLUUID[testateManagers.Length + 1];
690
691 int i = 0;
692 for (i = 0; i < testateManagers.Length; i++)
693 {
694 nestateManagers[i] = testateManagers[i];
695 }
696
697 nestateManagers[i] = avatarID;
698
699 //Saves it to the estate settings file
700 estateManagers = nestateManagers;
701
702 }
703 public void RemoveEstateManager(LLUUID avatarID)
704 {
705 int notfoundparam = 11; // starting high so the condense routine (max ten) doesn't run if we don't find it.
706 LLUUID[] testateManagers = GetEstateManagers(); // temporary estate managers list
707
708
709 int i = 0;
710 int foundpos = notfoundparam;
711
712 // search for estate manager.
713 for (i = 0; i < testateManagers.Length; i++)
714 {
715 if (testateManagers[i] == avatarID)
716 {
717 foundpos = i;
718 break;
719 }
720 }
721 if (foundpos < notfoundparam)
722 {
723 LLUUID[] restateManagers = new LLUUID[testateManagers.Length - 1];
724
725 // fill new estate managers array up to the found spot
726 for (int j = 0; j < foundpos; j++)
727 restateManagers[j] = testateManagers[j];
728
729 // skip over the estate manager we're removing and compress
730 for (int j = foundpos + 1; j < testateManagers.Length; j++)
731 restateManagers[j - 1] = testateManagers[j];
732
733 estateManagers = restateManagers;
734 }
735 else
736 {
737 OpenSim.Framework.Console.MainLog.Instance.Error("ESTATESETTINGS", "Unable to locate estate manager : " + avatarID.ToString() + " for removal");
738 }
739 }
740
686 #endregion 741 #endregion
687 742
688 private ConfigurationMember configMember; 743 private ConfigurationMember configMember;
689 744
690 public EstateSettings() 745 public EstateSettings()