diff options
author | Melanie | 2010-11-25 03:16:52 +0000 |
---|---|---|
committer | Melanie | 2010-11-25 03:16:52 +0000 |
commit | 57c4def254b85997f5b8a4cd4e7d1db550947290 (patch) | |
tree | 89c9521d8e208820ff54a1505088792b1eabb1a6 /OpenSim/Region/CoreModules/World | |
parent | Finish the RestartModule and fix some bugs. Add new console commands: (diff) | |
download | opensim-SC_OLD-57c4def254b85997f5b8a4cd4e7d1db550947290.zip opensim-SC_OLD-57c4def254b85997f5b8a4cd4e7d1db550947290.tar.gz opensim-SC_OLD-57c4def254b85997f5b8a4cd4e7d1db550947290.tar.bz2 opensim-SC_OLD-57c4def254b85997f5b8a4cd4e7d1db550947290.tar.xz |
Change all restarting to use the restart module. Remove hardcoded behavior
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-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 622fc08..ddae20f 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -231,7 +231,23 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
231 | 231 | ||
232 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) | 232 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) |
233 | { | 233 | { |
234 | m_scene.Restart(timeInSeconds); | 234 | IRestartModule restartModule = m_scene.RequestModuleInterface<IRestartModule>(); |
235 | if (restartModule != null) | ||
236 | { | ||
237 | List<int> times = new List<int>(); | ||
238 | while (timeInSeconds > 0) | ||
239 | { | ||
240 | times.Add(timeInSeconds); | ||
241 | if (timeInSeconds > 300) | ||
242 | timeInSeconds -= 120; | ||
243 | else if (timeInSeconds > 30) | ||
244 | timeInSeconds -= 30; | ||
245 | else | ||
246 | timeInSeconds -= 15; | ||
247 | } | ||
248 | |||
249 | restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true); | ||
250 | } | ||
235 | } | 251 | } |
236 | 252 | ||
237 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) | 253 | private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID) |