aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-19 21:00:31 +0100
committerJustin Clark-Casey (justincc)2013-08-19 21:00:31 +0100
commit2fa42f24fd0e80adc16320a404e3e85ca6d1baa1 (patch)
tree9ff4539020853e60868f20a1aee7b93c8cd91768 /OpenSim/Framework
parentCreate a separate pCampbot "disconnect" console command which disconnects con... (diff)
downloadopensim-SC_OLD-2fa42f24fd0e80adc16320a404e3e85ca6d1baa1.zip
opensim-SC_OLD-2fa42f24fd0e80adc16320a404e3e85ca6d1baa1.tar.gz
opensim-SC_OLD-2fa42f24fd0e80adc16320a404e3e85ca6d1baa1.tar.bz2
opensim-SC_OLD-2fa42f24fd0e80adc16320a404e3e85ca6d1baa1.tar.xz
Make it possible to disconnected a specified number of bots via the pCampbot console command "disconnect [<n>]"
Bots disconnected are ascending from last in numeric order. Temporarily no way to reconnect bots.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Console/ConsoleUtil.cs29
1 files changed, 27 insertions, 2 deletions
diff --git a/OpenSim/Framework/Console/ConsoleUtil.cs b/OpenSim/Framework/Console/ConsoleUtil.cs
index c0ff454..794bfaf 100644
--- a/OpenSim/Framework/Console/ConsoleUtil.cs
+++ b/OpenSim/Framework/Console/ConsoleUtil.cs
@@ -179,8 +179,8 @@ namespace OpenSim.Framework.Console
179 /// Convert a console integer to an int, automatically complaining if a console is given. 179 /// Convert a console integer to an int, automatically complaining if a console is given.
180 /// </summary> 180 /// </summary>
181 /// <param name='console'>Can be null if no console is available.</param> 181 /// <param name='console'>Can be null if no console is available.</param>
182 /// <param name='rawConsoleVector'>/param> 182 /// <param name='rawConsoleInt'>/param>
183 /// <param name='vector'></param> 183 /// <param name='i'></param>
184 /// <returns></returns> 184 /// <returns></returns>
185 public static bool TryParseConsoleInt(ICommandConsole console, string rawConsoleInt, out int i) 185 public static bool TryParseConsoleInt(ICommandConsole console, string rawConsoleInt, out int i)
186 { 186 {
@@ -194,6 +194,31 @@ namespace OpenSim.Framework.Console
194 194
195 return true; 195 return true;
196 } 196 }
197
198 /// <summary>
199 /// Convert a console integer to a natural int, automatically complaining if a console is given.
200 /// </summary>
201 /// <param name='console'>Can be null if no console is available.</param>
202 /// <param name='rawConsoleInt'>/param>
203 /// <param name='i'></param>
204 /// <returns></returns>
205 public static bool TryParseConsoleNaturalInt(ICommandConsole console, string rawConsoleInt, out int i)
206 {
207 if (TryParseConsoleInt(console, rawConsoleInt, out i))
208 {
209 if (i < 0)
210 {
211 if (console != null)
212 console.OutputFormat("ERROR: {0} is not a positive integer", rawConsoleInt);
213
214 return false;
215 }
216
217 return true;
218 }
219
220 return false;
221 }
197 222
198 /// <summary> 223 /// <summary>
199 /// Convert a minimum vector input from the console to an OpenMetaverse.Vector3 224 /// Convert a minimum vector input from the console to an OpenMetaverse.Vector3