diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 14de4f4..75cf0c6 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -233,7 +233,23 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
233 | 233 | ||
234 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) | 234 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) |
235 | { | 235 | { |
236 | m_scene.Restart(timeInSeconds); | 236 | IRestartModule restartModule = m_scene.RequestModuleInterface<IRestartModule>(); |
237 | if (restartModule != null) | ||
238 | { | ||
239 | List<int> times = new List<int>(); | ||
240 | while (timeInSeconds > 0) | ||
241 | { | ||
242 | times.Add(timeInSeconds); | ||
243 | if (timeInSeconds > 300) | ||
244 | timeInSeconds -= 120; | ||
245 | else if (timeInSeconds > 30) | ||
246 | timeInSeconds -= 30; | ||
247 | else | ||
248 | timeInSeconds -= 15; | ||
249 | } | ||
250 | |||
251 | restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true); | ||
252 | } | ||
237 | } | 253 | } |
238 | 254 | ||
239 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) | 255 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) |