aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorUbitUmarov2017-10-06 02:40:28 +0100
committerUbitUmarov2017-10-06 02:40:28 +0100
commit8520ceed630cd0abea467559f613a50311723cb0 (patch)
treeb707f3a2f4ceccea4cd5a4c6deb11f2cedd8b899 /OpenSim/Region/CoreModules/World
parentbug fix: add missing stub for osSetInertia (diff)
downloadopensim-SC-8520ceed630cd0abea467559f613a50311723cb0.zip
opensim-SC-8520ceed630cd0abea467559f613a50311723cb0.tar.gz
opensim-SC-8520ceed630cd0abea467559f613a50311723cb0.tar.bz2
opensim-SC-8520ceed630cd0abea467559f613a50311723cb0.tar.xz
mantis 8246: don't allow 'delete object name' to delete attachments, but allow delete object id, with confirmation
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
index 5a2a173..28f1869 100644
--- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
@@ -803,12 +803,15 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
803 else 803 else
804 so = m_scene.GetSceneObjectGroup(localId); 804 so = m_scene.GetSceneObjectGroup(localId);
805 805
806 if (so!= null && !so.IsAttachment) 806 if (so!= null)
807 deletes.Add(so); 807 {
808 808 deletes.Add(so);
809 // if (deletes.Count == 0) 809 if(so.IsAttachment)
810 // m_console.OutputFormat("No objects were found with uuid {0}", match); 810 {
811 811 requireConfirmation = true;
812 m_console.OutputFormat("Warning: object with uuid {0} is a attachment", uuid);
813 }
814 }
812 break; 815 break;
813 816
814 case "name": 817 case "name":
@@ -900,15 +903,15 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
900 903
901 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); 904 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
902 Action<SceneObjectGroup> searchAction; 905 Action<SceneObjectGroup> searchAction;
903 906 int refusedAttachments = 0;
904 if (useRegex) 907 if (useRegex)
905 { 908 {
906 Regex nameRegex = new Regex(name); 909 Regex nameRegex = new Regex(name);
907 searchAction = so => { if (nameRegex.IsMatch(so.Name)) { sceneObjects.Add(so); }}; 910 searchAction = so => { if (nameRegex.IsMatch(so.Name)) {if(!so.IsAttachment) sceneObjects.Add(so);}};
908 } 911 }
909 else 912 else
910 { 913 {
911 searchAction = so => { if (so.Name == name) { sceneObjects.Add(so); }}; 914 searchAction = so => { if (so.Name == name) {if(!so.IsAttachment) sceneObjects.Add(so);}};
912 } 915 }
913 916
914 m_scene.ForEachSOG(searchAction); 917 m_scene.ForEachSOG(searchAction);