mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Change all restarting to use the restart module. Remove hardcoded behavior
This commit is contained in:
@@ -231,7 +231,23 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
|
||||
private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds)
|
||||
{
|
||||
m_scene.Restart(timeInSeconds);
|
||||
IRestartModule restartModule = m_scene.RequestModuleInterface<IRestartModule>();
|
||||
if (restartModule != null)
|
||||
{
|
||||
List<int> times = new List<int>();
|
||||
while (timeInSeconds > 0)
|
||||
{
|
||||
times.Add(timeInSeconds);
|
||||
if (timeInSeconds > 300)
|
||||
timeInSeconds -= 120;
|
||||
else if (timeInSeconds > 30)
|
||||
timeInSeconds -= 30;
|
||||
else
|
||||
timeInSeconds -= 15;
|
||||
}
|
||||
|
||||
restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID)
|
||||
|
||||
Reference in New Issue
Block a user