Make it possible for the "deregister region id" command to accept more than one id
parent
ab1c63b20c
commit
b21f261008
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue