aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/pCampBot.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tools/pCampBot/pCampBot.cs')
-rw-r--r--OpenSim/Tools/pCampBot/pCampBot.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs
index a69fbf0..4d3b06d 100644
--- a/OpenSim/Tools/pCampBot/pCampBot.cs
+++ b/OpenSim/Tools/pCampBot/pCampBot.cs
@@ -26,6 +26,8 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Reflection;
30using log4net;
29using Nini.Config; 31using Nini.Config;
30using OpenSim.Framework; 32using OpenSim.Framework;
31using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
@@ -44,6 +46,8 @@ namespace pCampBot
44 46
45 public class pCampBot 47 public class pCampBot
46 { 48 {
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50
47 [STAThread] 51 [STAThread]
48 public static void Main(string[] args) 52 public static void Main(string[] args)
49 { 53 {
@@ -60,9 +64,17 @@ namespace pCampBot
60 64
61 //startup specified number of bots. 1 is the default 65 //startup specified number of bots. 1 is the default
62 bm.dobotStartup(botcount, config); 66 bm.dobotStartup(botcount, config);
67
63 while (true) 68 while (true)
64 { 69 {
65 MainConsole.Instance.Prompt(); 70 try
71 {
72 MainConsole.Instance.Prompt();
73 }
74 catch (Exception e)
75 {
76 m_log.ErrorFormat("Command error: {0}", e);
77 }
66 } 78 }
67 } 79 }
68 } 80 }
@@ -72,12 +84,13 @@ namespace pCampBot
72 //Set up our nifty config.. thanks to nini 84 //Set up our nifty config.. thanks to nini
73 ArgvConfigSource cs = new ArgvConfigSource(args); 85 ArgvConfigSource cs = new ArgvConfigSource(args);
74 86
75 cs.AddSwitch("Startup", "botcount","n"); 87 cs.AddSwitch("Startup", "botcount", "n");
76 cs.AddSwitch("Startup", "loginuri","l"); 88 cs.AddSwitch("Startup", "loginuri", "l");
77 cs.AddSwitch("Startup", "firstname"); 89 cs.AddSwitch("Startup", "firstname");
78 cs.AddSwitch("Startup", "lastname"); 90 cs.AddSwitch("Startup", "lastname");
79 cs.AddSwitch("Startup", "password"); 91 cs.AddSwitch("Startup", "password");
80 cs.AddSwitch("Startup", "help","h"); 92 cs.AddSwitch("Startup", "behaviours", "b");
93 cs.AddSwitch("Startup", "help", "h");
81 cs.AddSwitch("Startup", "wear"); 94 cs.AddSwitch("Startup", "wear");
82 95
83 IConfig ol = cs.Configs["Startup"]; 96 IConfig ol = cs.Configs["Startup"];
@@ -98,6 +111,7 @@ namespace pCampBot
98 " -firstname first name for the bots\n" + 111 " -firstname first name for the bots\n" +
99 " -lastname lastname for the bots. Each lastname will have _<bot-number> appended, e.g. Ima Bot_0\n" + 112 " -lastname lastname for the bots. Each lastname will have _<bot-number> appended, e.g. Ima Bot_0\n" +
100 " -password password for the bots\n" + 113 " -password password for the bots\n" +
114 " -b, behaviours behaviours for bots. Current options p (physics), g (grab). Comma separated, e.g. p,g. Default is p",
101 " -wear set appearance folder to load from (default: no)\n" + 115 " -wear set appearance folder to load from (default: no)\n" +
102 " -h, -help show this message" 116 " -h, -help show this message"
103 ); 117 );