From f9807884a425c2d91e8f2035993a0ca5e210eb43 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 25 Nov 2009 15:28:43 +0000 Subject: Add MIT/X11 licensed NDesk.Options (http://www.ndesk.org/Options) DLL to aid command line parsing --- OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 181f4c6..98fdec3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -26,9 +26,11 @@ */ using System; +using System.Collections.Generic; using System.IO; using System.Reflection; using log4net; +using NDesk.Options; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -91,7 +93,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) { - if (cmdparams.Length > 2) + OptionSet options = new OptionSet() {}; + List mainParams = options.Parse(cmdparams); + + foreach (string param in mainParams) + m_log.DebugFormat("Found param [{0}]", param); + + if (mainParams.Count > 2) { DearchiveRegion(cmdparams[2]); } -- cgit v1.1