diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Objects')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | 21 |
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); |