Add AllowRegionRestartFromClient setting to [EstateManagement] section of OpenSim.ini.
Setting this to false will block all restart requests from the viewer even if they are otherwise legitimate. One use is to block region restarts if necessary whilst restart functionality remains buggy or triggers bugs in modules, though these should be fixed as soon as practicable. Default is true, as has been the case historically.0.7.4-extended
parent
e9fbfd0905
commit
207233335e
|
@ -52,6 +52,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
|
||||
protected EstateManagementCommands m_commands;
|
||||
|
||||
/// <summary>
|
||||
/// If false, region restart requests from the client are blocked even if they are otherwise legitimate.
|
||||
/// </summary>
|
||||
public bool AllowRegionRestartFromClient { get; set; }
|
||||
|
||||
private EstateTerrainXferHandler TerrainUploader;
|
||||
public TelehubManager m_Telehub;
|
||||
|
||||
|
@ -59,6 +64,53 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
public event ChangeDelegate OnEstateInfoChange;
|
||||
public event MessageDelegate OnEstateMessage;
|
||||
|
||||
#region Region Module interface
|
||||
|
||||
public string Name { get { return "EstateManagementModule"; } }
|
||||
|
||||
public Type ReplaceableInterface { get { return null; } }
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
AllowRegionRestartFromClient = true;
|
||||
|
||||
IConfig config = source.Configs["EstateManagement"];
|
||||
|
||||
if (config != null)
|
||||
AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true);
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
Scene = scene;
|
||||
Scene.RegisterModuleInterface<IEstateModule>(this);
|
||||
Scene.EventManager.OnNewClient += EventManager_OnNewClient;
|
||||
Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
|
||||
|
||||
m_Telehub = new TelehubManager(scene);
|
||||
|
||||
m_commands = new EstateManagementCommands(this);
|
||||
m_commands.Initialise();
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene) {}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
// Sets up the sun module based no the saved Estate and Region Settings
|
||||
// DO NOT REMOVE or the sun will stop working
|
||||
scene.TriggerEstateSunUpdate();
|
||||
|
||||
UserManager = scene.RequestModuleInterface<IUserManagement>();
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
m_commands.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Packet Data Responders
|
||||
|
||||
private void sendDetailedEstateData(IClientAPI remote_client, UUID invoice)
|
||||
|
@ -183,6 +235,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
Scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
|
||||
break;
|
||||
}
|
||||
|
||||
Scene.RegionInfo.RegionSettings.Save();
|
||||
TriggerRegionInfoChange();
|
||||
sendRegionInfoPacketToAll();
|
||||
|
@ -214,6 +267,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
Scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
|
||||
break;
|
||||
}
|
||||
|
||||
Scene.RegionInfo.RegionSettings.Save();
|
||||
TriggerRegionInfoChange();
|
||||
sendRegionHandshakeToAll();
|
||||
|
@ -254,6 +308,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
|
||||
private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds)
|
||||
{
|
||||
if (!AllowRegionRestartFromClient)
|
||||
{
|
||||
remoteClient.SendAlertMessage("Region restart has been disabled on this simulator.");
|
||||
return;
|
||||
}
|
||||
|
||||
IRestartModule restartModule = Scene.RequestModuleInterface<IRestartModule>();
|
||||
if (restartModule != null)
|
||||
{
|
||||
|
@ -328,6 +388,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
if ((estateAccessType & 8) != 0) // User remove
|
||||
{
|
||||
if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true))
|
||||
|
@ -359,6 +420,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions");
|
||||
}
|
||||
}
|
||||
|
||||
if ((estateAccessType & 16) != 0) // Group add
|
||||
{
|
||||
if (Scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true))
|
||||
|
@ -622,7 +684,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
}
|
||||
}
|
||||
|
||||
public void handleOnEstateManageTelehub (IClientAPI client, UUID invoice, UUID senderID, string cmd, uint param1)
|
||||
public void handleOnEstateManageTelehub(IClientAPI client, UUID invoice, UUID senderID, string cmd, uint param1)
|
||||
{
|
||||
SceneObjectPart part;
|
||||
|
||||
|
@ -1080,45 +1142,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
|
||||
#endregion
|
||||
|
||||
#region IRegionModule Members
|
||||
|
||||
public string Name { get { return "EstateManagementModule"; } }
|
||||
|
||||
public Type ReplaceableInterface { get { return null; } }
|
||||
|
||||
public void Initialise(IConfigSource source) {}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
Scene = scene;
|
||||
Scene.RegisterModuleInterface<IEstateModule>(this);
|
||||
Scene.EventManager.OnNewClient += EventManager_OnNewClient;
|
||||
Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
|
||||
|
||||
m_Telehub = new TelehubManager(scene);
|
||||
|
||||
m_commands = new EstateManagementCommands(this);
|
||||
m_commands.Initialise();
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene) {}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
// Sets up the sun module based no the saved Estate and Region Settings
|
||||
// DO NOT REMOVE or the sun will stop working
|
||||
scene.TriggerEstateSunUpdate();
|
||||
|
||||
UserManager = scene.RequestModuleInterface<IUserManagement>();
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
m_commands.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Other Functions
|
||||
|
||||
public void changeWaterHeight(float height)
|
||||
|
|
|
@ -367,6 +367,12 @@
|
|||
; alert_uri = "http://myappserver.net/my_handler/"
|
||||
|
||||
|
||||
[EstateManagement]
|
||||
; If false, then block any region restart requests from the client even if they are otherwise valid.
|
||||
; Default is true
|
||||
AllowRegionRestartFromClient = true
|
||||
|
||||
|
||||
[SMTP]
|
||||
enabled = false
|
||||
|
||||
|
|
Loading…
Reference in New Issue