Make it possible for the "deregister region id" command to accept more than one id

0.7.6-extended
Justin Clark-Casey (justincc) 2013-08-23 01:03:27 +01:00
parent ab1c63b20c
commit b21f261008
1 changed files with 27 additions and 24 deletions

View File

@ -86,7 +86,7 @@ namespace OpenSim.Services.GridService
{
MainConsole.Instance.Commands.AddCommand("Regions", true,
"deregister region id",
"deregister region id <Region UUID>",
"deregister region id <region-id>+",
"Deregister a region manually.",
String.Empty,
HandleDeregisterRegion);
@ -526,13 +526,15 @@ namespace OpenSim.Services.GridService
private void HandleDeregisterRegion(string module, string[] cmd)
{
if (cmd.Length != 4)
if (cmd.Length < 4)
{
MainConsole.Instance.Output("Syntax: degregister region id <Region UUID>");
MainConsole.Instance.Output("Usage: degregister region id <region-id>+");
return;
}
string rawRegionUuid = cmd[3];
for (int i = 3; i < cmd.Length; i++)
{
string rawRegionUuid = cmd[i];
UUID regionUuid;
if (!UUID.TryParse(rawRegionUuid, out regionUuid))
@ -558,6 +560,7 @@ namespace OpenSim.Services.GridService
// I don't think this can ever occur if we know that the region exists.
MainConsole.Instance.OutputFormat("Error deregistering {0} {1}", region.RegionName, regionUuid);
}
}
return;
}