aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/EstateSettings.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-02 20:25:47 +0000
committerTeravus Ovares2008-01-02 20:25:47 +0000
commita72d33d3a5da5bb48e9c95fd355458be335fee3e (patch)
tree968f98add2cb0e846d98c8f00826d4c22cbe59f9 /OpenSim/Framework/EstateSettings.cs
parentFixed buffer overrun bug in ZeroDecodeCommand (diff)
downloadopensim-SC-a72d33d3a5da5bb48e9c95fd355458be335fee3e.zip
opensim-SC-a72d33d3a5da5bb48e9c95fd355458be335fee3e.tar.gz
opensim-SC-a72d33d3a5da5bb48e9c95fd355458be335fee3e.tar.bz2
opensim-SC-a72d33d3a5da5bb48e9c95fd355458be335fee3e.tar.xz
* Added the ability for Region Owners to add and remove estate managers using the estate tools.
* Estate managers get abilities like the region owner for now. * Estate managers, you'll need to request server admin status to be able to activate the estate tools dialog (haven't figured out why this is the case yet) * Switching from grid mode to standalone or switching grids will make the stored Estate Manager UUIDs not match up with a valid account so you'll see (waiting) listed there instead of a user until you reset them or go back to the grid you added them from.
Diffstat (limited to 'OpenSim/Framework/EstateSettings.cs')
-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()