aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2012-01-31 21:53:32 +0000
committerMelanie2012-01-31 21:53:32 +0000
commit727ddffb71dc1f1b8e68d9e7604c7dc548d5c466 (patch)
treeffaf74e8404097569e635462e59513589827fa40 /OpenSim/Region/Framework
parentMerge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff)
parentMove object delete commands into a commands region module, in preparation for... (diff)
downloadopensim-SC-727ddffb71dc1f1b8e68d9e7604c7dc548d5c466.zip
opensim-SC-727ddffb71dc1f1b8e68d9e7604c7dc548d5c466.tar.gz
opensim-SC-727ddffb71dc1f1b8e68d9e7604c7dc548d5c466.tar.bz2
opensim-SC-727ddffb71dc1f1b8e68d9e7604c7dc548d5c466.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs104
1 files changed, 0 insertions, 104 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 9b31fac..273d8bd 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -623,23 +623,6 @@ namespace OpenSim.Region.Framework.Scenes
623 "reload estate", 623 "reload estate",
624 "Reload the estate data", HandleReloadEstate); 624 "Reload the estate data", HandleReloadEstate);
625 625
626 MainConsole.Instance.Commands.AddCommand("region", false, "delete object owner",
627 "delete object owner <UUID>",
628 "Delete object by owner", HandleDeleteObject);
629 MainConsole.Instance.Commands.AddCommand("region", false, "delete object creator",
630 "delete object creator <UUID>",
631 "Delete object by creator", HandleDeleteObject);
632 MainConsole.Instance.Commands.AddCommand("region", false, "delete object uuid",
633 "delete object uuid <UUID>",
634 "Delete object by uuid", HandleDeleteObject);
635 MainConsole.Instance.Commands.AddCommand("region", false, "delete object name",
636 "delete object name <name>",
637 "Delete object by name", HandleDeleteObject);
638
639 MainConsole.Instance.Commands.AddCommand("region", false, "delete object outside",
640 "delete object outside",
641 "Delete all objects outside boundaries", HandleDeleteObject);
642
643 //Bind Storage Manager functions to some land manager functions for this scene 626 //Bind Storage Manager functions to some land manager functions for this scene
644 EventManager.OnLandObjectAdded += 627 EventManager.OnLandObjectAdded +=
645 new EventManager.LandObjectAdded(simDataService.StoreLandObject); 628 new EventManager.LandObjectAdded(simDataService.StoreLandObject);
@@ -5079,93 +5062,6 @@ Environment.Exit(1);
5079 } 5062 }
5080 } 5063 }
5081 5064
5082 private void HandleDeleteObject(string module, string[] cmd)
5083 {
5084 if (cmd.Length < 3)
5085 return;
5086
5087 string mode = cmd[2];
5088 string o = "";
5089
5090 if (mode != "outside")
5091 {
5092 if (cmd.Length < 4)
5093 return;
5094
5095 o = cmd[3];
5096 }
5097
5098 List<SceneObjectGroup> deletes = new List<SceneObjectGroup>();
5099
5100 UUID match;
5101
5102 switch (mode)
5103 {
5104 case "owner":
5105 if (!UUID.TryParse(o, out match))
5106 return;
5107 ForEachSOG(delegate (SceneObjectGroup g)
5108 {
5109 if (g.OwnerID == match && !g.IsAttachment)
5110 deletes.Add(g);
5111 });
5112 break;
5113 case "creator":
5114 if (!UUID.TryParse(o, out match))
5115 return;
5116 ForEachSOG(delegate (SceneObjectGroup g)
5117 {
5118 if (g.RootPart.CreatorID == match && !g.IsAttachment)
5119 deletes.Add(g);
5120 });
5121 break;
5122 case "uuid":
5123 if (!UUID.TryParse(o, out match))
5124 return;
5125 ForEachSOG(delegate (SceneObjectGroup g)
5126 {
5127 if (g.UUID == match && !g.IsAttachment)
5128 deletes.Add(g);
5129 });
5130 break;
5131 case "name":
5132 ForEachSOG(delegate (SceneObjectGroup g)
5133 {
5134 if (g.RootPart.Name == o && !g.IsAttachment)
5135 deletes.Add(g);
5136 });
5137 break;
5138 case "outside":
5139 ForEachSOG(delegate (SceneObjectGroup g)
5140 {
5141 SceneObjectPart rootPart = g.RootPart;
5142 bool delete = false;
5143
5144 if (rootPart.GroupPosition.Z < 0.0 || rootPart.GroupPosition.Z > 10000.0)
5145 {
5146 delete = true;
5147 }
5148 else
5149 {
5150 ILandObject parcel = LandChannel.GetLandObject(rootPart.GroupPosition.X, rootPart.GroupPosition.Y);
5151
5152 if (parcel == null || parcel.LandData.Name == "NO LAND")
5153 delete = true;
5154 }
5155
5156 if (delete && !g.IsAttachment && !deletes.Contains(g))
5157 deletes.Add(g);
5158 });
5159 break;
5160 }
5161
5162 foreach (SceneObjectGroup g in deletes)
5163 {
5164 m_log.InfoFormat("[SCENE]: Deleting object {0}", g.UUID);
5165 DeleteSceneObject(g, false);
5166 }
5167 }
5168
5169 private void HandleReloadEstate(string module, string[] cmd) 5065 private void HandleReloadEstate(string module, string[] cmd)
5170 { 5066 {
5171 if (MainConsole.Instance.ConsoleScene == null || 5067 if (MainConsole.Instance.ConsoleScene == null ||