mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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.
This commit is contained in:
@@ -179,8 +179,8 @@ namespace OpenSim.Framework.Console
|
||||
/// Convert a console integer to an int, automatically complaining if a console is given.
|
||||
/// </summary>
|
||||
/// <param name='console'>Can be null if no console is available.</param>
|
||||
/// <param name='rawConsoleVector'>/param>
|
||||
/// <param name='vector'></param>
|
||||
/// <param name='rawConsoleInt'>/param>
|
||||
/// <param name='i'></param>
|
||||
/// <returns></returns>
|
||||
public static bool TryParseConsoleInt(ICommandConsole console, string rawConsoleInt, out int i)
|
||||
{
|
||||
@@ -194,6 +194,31 @@ namespace OpenSim.Framework.Console
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a console integer to a natural int, automatically complaining if a console is given.
|
||||
/// </summary>
|
||||
/// <param name='console'>Can be null if no console is available.</param>
|
||||
/// <param name='rawConsoleInt'>/param>
|
||||
/// <param name='i'></param>
|
||||
/// <returns></returns>
|
||||
public static bool TryParseConsoleNaturalInt(ICommandConsole console, string rawConsoleInt, out int i)
|
||||
{
|
||||
if (TryParseConsoleInt(console, rawConsoleInt, out i))
|
||||
{
|
||||
if (i < 0)
|
||||
{
|
||||
if (console != null)
|
||||
console.OutputFormat("ERROR: {0} is not a positive integer", rawConsoleInt);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a minimum vector input from the console to an OpenMetaverse.Vector3
|
||||
|
||||
Reference in New Issue
Block a user