diff options
author | Justin Clark-Casey (justincc) | 2009-11-25 15:28:43 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-11-25 15:28:43 +0000 |
commit | f9807884a425c2d91e8f2035993a0ca5e210eb43 (patch) | |
tree | 36d4e7e70483afe86e4b88edcc4de987509dc25a /OpenSim | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-f9807884a425c2d91e8f2035993a0ca5e210eb43.zip opensim-SC-f9807884a425c2d91e8f2035993a0ca5e210eb43.tar.gz opensim-SC-f9807884a425c2d91e8f2035993a0ca5e210eb43.tar.bz2 opensim-SC-f9807884a425c2d91e8f2035993a0ca5e210eb43.tar.xz |
Add MIT/X11 licensed NDesk.Options (http://www.ndesk.org/Options) DLL to aid command line parsing
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 10 |
1 files changed, 9 insertions, 1 deletions
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 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.IO; | 30 | using System.IO; |
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using log4net; | 32 | using log4net; |
33 | using NDesk.Options; | ||
32 | using Nini.Config; | 34 | using Nini.Config; |
33 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
34 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
@@ -91,7 +93,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
91 | /// <param name="cmdparams"></param> | 93 | /// <param name="cmdparams"></param> |
92 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) | 94 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) |
93 | { | 95 | { |
94 | if (cmdparams.Length > 2) | 96 | OptionSet options = new OptionSet() {}; |
97 | List<string> mainParams = options.Parse(cmdparams); | ||
98 | |||
99 | foreach (string param in mainParams) | ||
100 | m_log.DebugFormat("Found param [{0}]", param); | ||
101 | |||
102 | if (mainParams.Count > 2) | ||
95 | { | 103 | { |
96 | DearchiveRegion(cmdparams[2]); | 104 | DearchiveRegion(cmdparams[2]); |
97 | } | 105 | } |