From ed641b22b3c840cd133b71e069cb93cd4dce1d7d Mon Sep 17 00:00:00 2001 From: Mandarinka Tasty Date: Wed, 4 Jan 2017 20:06:41 +0100 Subject: Show details of scene objects with given ownerId. Signed-off-by: Mandarinka Tasty Signed-off-by: Melanie Thielker --- .../World/Objects/Commands/ObjectCommandsModule.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'OpenSim/Region/CoreModules/World/Objects') diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index 688648b..e53ab95 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs @@ -152,6 +152,15 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands m_console.Commands.AddCommand( "Objects", false, + "show object owner", + "show object owner [--full] ", + "Show details of scene objects with given owner.", + "The --full option will print out information on all the parts of the object.\n", + HandleShowObjectByOwnerID); + + m_console.Commands.AddCommand( + "Objects", + false, "show object pos", "show object pos [--full] to ", "Show details of scene objects within the given area.", @@ -325,6 +334,32 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands OutputSogsToConsole(searchPredicate, showFull); } + private void HandleShowObjectByOwnerID(string module, string[] cmdparams) + { + if (!(m_console.ConsoleScene == null || m_console.ConsoleScene == m_scene)) + return; + + bool showFull = false; + OptionSet options = new OptionSet().Add("full", v => showFull = v != null); + + List mainParams = options.Parse(cmdparams); + + if (mainParams.Count < 4) + { + m_console.OutputFormat("Usage: show object owner "); + return; + } + + UUID ownerID; + if (!ConsoleUtil.TryParseConsoleUuid(m_console, mainParams[3], out ownerID)) + return; + + Predicate searchPredicate + = so => so.OwnerID == ownerID && !so.IsAttachment; + + OutputSogsToConsole(searchPredicate, showFull); + } + private void HandleShowObjectByPos(string module, string[] cmdparams) { if (!(m_console.ConsoleScene == null || m_console.ConsoleScene == m_scene)) -- cgit v1.1