diff options
author | Melanie Thielker | 2009-02-07 12:25:39 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-02-07 12:25:39 +0000 |
commit | 54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a (patch) | |
tree | f606cbdbc383ec21fee28f0a1454140a1c714278 /OpenSim/Region/Application/HGOpenSimNode.cs | |
parent | Thank you dslake for a patch that: (diff) | |
download | opensim-SC-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.zip opensim-SC-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.tar.gz opensim-SC-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.tar.bz2 opensim-SC-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.tar.xz |
Replace the console for all OpenSim apps with a new console featuring command
line editing, context sensitive help (press ? at any time), command line
history, a new plugin command system and new appender features thet let you
type while the console is scrolling. Seamlessly integrates the ICommander
interfaces.
Diffstat (limited to 'OpenSim/Region/Application/HGOpenSimNode.cs')
-rw-r--r-- | OpenSim/Region/Application/HGOpenSimNode.cs | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/OpenSim/Region/Application/HGOpenSimNode.cs b/OpenSim/Region/Application/HGOpenSimNode.cs index 4941fb4..2de9ddf 100644 --- a/OpenSim/Region/Application/HGOpenSimNode.cs +++ b/OpenSim/Region/Application/HGOpenSimNode.cs | |||
@@ -77,6 +77,9 @@ namespace OpenSim | |||
77 | m_log.Info("===================================================================="); | 77 | m_log.Info("===================================================================="); |
78 | 78 | ||
79 | base.StartupSpecific(); | 79 | base.StartupSpecific(); |
80 | |||
81 | MainConsole.Instance.Commands.AddCommand("hypergrid", "link-mapping", "link-mapping [<x> <y>] <cr>", "Set local coordinate to map HG regions to", RunCommand); | ||
82 | MainConsole.Instance.Commands.AddCommand("hypergrid", "link-region", "link-region <Xloc> <Yloc> <HostName> <HttpPort> <LocalName> <cr>", "Link a hypergrid region", RunCommand); | ||
80 | } | 83 | } |
81 | 84 | ||
82 | protected override void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) | 85 | protected override void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) |
@@ -143,11 +146,18 @@ namespace OpenSim | |||
143 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); | 146 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); |
144 | } | 147 | } |
145 | 148 | ||
146 | public override void RunCmd(string command, string[] cmdparams) | 149 | public void RunCommand(string module, string[] cp) |
147 | { | 150 | { |
151 | List<string> cmdparams = new List<string>(cp); | ||
152 | if (cmdparams.Count < 1) | ||
153 | return; | ||
154 | |||
155 | string command = cmdparams[0]; | ||
156 | cmdparams.RemoveAt(0); | ||
157 | |||
148 | if (command.Equals("link-mapping")) | 158 | if (command.Equals("link-mapping")) |
149 | { | 159 | { |
150 | if (cmdparams.Length == 2) | 160 | if (cmdparams.Count == 2) |
151 | { | 161 | { |
152 | try | 162 | try |
153 | { | 163 | { |
@@ -166,11 +176,11 @@ namespace OpenSim | |||
166 | else if (command.Equals("link-region")) | 176 | else if (command.Equals("link-region")) |
167 | { | 177 | { |
168 | // link-region <Xloc> <Yloc> <HostName> <HttpPort> <LocalName> | 178 | // link-region <Xloc> <Yloc> <HostName> <HttpPort> <LocalName> |
169 | if (cmdparams.Length < 4) | 179 | if (cmdparams.Count < 4) |
170 | { | 180 | { |
171 | if ((cmdparams.Length == 1) || (cmdparams.Length ==2)) | 181 | if ((cmdparams.Count == 1) || (cmdparams.Count ==2)) |
172 | { | 182 | { |
173 | LoadXmlLinkFile(cmdparams); | 183 | LoadXmlLinkFile(cmdparams.ToArray()); |
174 | } | 184 | } |
175 | else | 185 | else |
176 | { | 186 | { |
@@ -201,19 +211,16 @@ namespace OpenSim | |||
201 | 211 | ||
202 | if (TryCreateLink(xloc, yloc, externalPort, externalHostName, out regInfo)) | 212 | if (TryCreateLink(xloc, yloc, externalPort, externalHostName, out regInfo)) |
203 | { | 213 | { |
204 | if (cmdparams.Length >= 5) | 214 | if (cmdparams.Count >= 5) |
205 | { | 215 | { |
206 | regInfo.RegionName = ""; | 216 | regInfo.RegionName = ""; |
207 | for (int i = 4; i < cmdparams.Length; i++) | 217 | for (int i = 4; i < cmdparams.Count; i++) |
208 | regInfo.RegionName += cmdparams[i] + " "; | 218 | regInfo.RegionName += cmdparams[i] + " "; |
209 | } | 219 | } |
210 | } | 220 | } |
211 | 221 | ||
212 | return; | 222 | return; |
213 | } | 223 | } |
214 | |||
215 | base.RunCmd(command, cmdparams); | ||
216 | |||
217 | } | 224 | } |
218 | 225 | ||
219 | private void LoadXmlLinkFile(string[] cmdparams) | 226 | private void LoadXmlLinkFile(string[] cmdparams) |