mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
This commit is contained in:
@@ -84,6 +84,13 @@ namespace OpenSim.Services.GridService
|
||||
|
||||
if (MainConsole.Instance != null)
|
||||
{
|
||||
MainConsole.Instance.Commands.AddCommand("Regions", true,
|
||||
"deregister region",
|
||||
"deregister region <Region UUID>",
|
||||
"Deregister a region manually.",
|
||||
String.Empty,
|
||||
HandleDeregisterRegion);
|
||||
|
||||
MainConsole.Instance.Commands.AddCommand("Regions", true,
|
||||
"show region",
|
||||
"show region <Region name>",
|
||||
@@ -495,6 +502,44 @@ namespace OpenSim.Services.GridService
|
||||
return -1;
|
||||
}
|
||||
|
||||
private void HandleDeregisterRegion(string module, string[] cmd)
|
||||
{
|
||||
if (cmd.Length != 3)
|
||||
{
|
||||
MainConsole.Instance.Output("Syntax: degregister region <Region UUID>");
|
||||
return;
|
||||
}
|
||||
|
||||
string rawRegionUuid = cmd[2];
|
||||
UUID regionUuid;
|
||||
|
||||
if (!UUID.TryParse(rawRegionUuid, out regionUuid))
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("{0} is not a valid region uuid", rawRegionUuid);
|
||||
return;
|
||||
}
|
||||
|
||||
GridRegion region = GetRegionByUUID(UUID.Zero, regionUuid);
|
||||
|
||||
if (region == null)
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("No region with UUID {0}", regionUuid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (DeregisterRegion(regionUuid))
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("Deregistered {0} {1}", region.RegionName, regionUuid);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
private void HandleShowRegion(string module, string[] cmd)
|
||||
{
|
||||
if (cmd.Length != 3)
|
||||
|
||||
Reference in New Issue
Block a user