aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/TestSuite
diff options
context:
space:
mode:
authorMelanie Thielker2009-02-07 12:25:39 +0000
committerMelanie Thielker2009-02-07 12:25:39 +0000
commit54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a (patch)
treef606cbdbc383ec21fee28f0a1454140a1c714278 /OpenSim/TestSuite
parentThank you dslake for a patch that: (diff)
downloadopensim-SC_OLD-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.zip
opensim-SC_OLD-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.tar.gz
opensim-SC_OLD-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.tar.bz2
opensim-SC_OLD-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/TestSuite')
-rw-r--r--OpenSim/TestSuite/BotManager.cs51
1 files changed, 1 insertions, 50 deletions
diff --git a/OpenSim/TestSuite/BotManager.cs b/OpenSim/TestSuite/BotManager.cs
index 8eb2027..0838214 100644
--- a/OpenSim/TestSuite/BotManager.cs
+++ b/OpenSim/TestSuite/BotManager.cs
@@ -40,7 +40,7 @@ namespace OpenSim.TestSuite
40 /// <summary> 40 /// <summary>
41 /// Thread/Bot manager for the application 41 /// Thread/Bot manager for the application
42 /// </summary> 42 /// </summary>
43 public class BotManager : conscmd_callback 43 public class BotManager
44 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
@@ -58,8 +58,6 @@ namespace OpenSim.TestSuite
58 public BotManager() 58 public BotManager()
59 { 59 {
60 m_log.Info("In bot manager"); 60 m_log.Info("In bot manager");
61 // m_console = CreateConsole();
62 // MainConsole.Instance = m_console;
63 m_lBot = new List<PhysicsBot>(); 61 m_lBot = new List<PhysicsBot>();
64 } 62 }
65 63
@@ -169,52 +167,5 @@ namespace OpenSim.TestSuite
169 pb.shutdown(); 167 pb.shutdown();
170 } 168 }
171 } 169 }
172
173 /// <summary>
174 /// Standard CreateConsole routine
175 /// </summary>
176 /// <returns></returns>
177 protected ConsoleBase CreateConsole()
178 {
179 return new ConsoleBase("Region", this);
180 }
181
182 /// <summary>
183 /// Command runnint tool.. Currently use it to add bots, shutdown and (dangerous)Forcequit
184 /// </summary>
185 /// <param name="command"></param>
186 /// <param name="cmdparams"></param>
187 public void RunCmd(string command, string[] cmdparams)
188 {
189 switch (command)
190 {
191 case "shutdown":
192 m_console.Warn("BOTMANAGER", "Shutting down bots");
193 doBotShutdown();
194 break;
195 case "quit":
196 m_console.Warn("DANGER", "This should only be used to quit the program if you've already used the shutdown command and the program hasn't quit");
197 Environment.Exit(0);
198 break;
199 case "addbots":
200 int newbots;
201 Int32.TryParse(cmdparams[0], out newbots);
202
203 if (newbots > 0)
204 addbots(newbots);
205 break;
206 case "help":
207 m_console.Notice("HELP", "\nshutdown - graceful shutdown\naddbots <n> - adds n bots to the test\nquit - forcequits, dangerous if you have not already run shutdown");
208 break;
209 }
210 }
211
212 /// <summary>
213 /// Required method to implement the conscmd_callback interface
214 /// </summary>
215 /// <param name="showParams">What to show</param>
216 public void Show(string[] showParams)
217 {
218 }
219 } 170 }
220} 171}