From 57c4def254b85997f5b8a4cd4e7d1db550947290 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 25 Nov 2010 03:16:52 +0000 Subject: Change all restarting to use the restart module. Remove hardcoded behavior --- .../RemoteController/RemoteAdminPlugin.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index c09252a..1b4d1ea 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -208,18 +208,25 @@ namespace OpenSim.ApplicationPlugins.RemoteController UUID regionID = new UUID((string) requestData["regionID"]); - responseData["accepted"] = true; - responseData["success"] = true; - response.Value = responseData; - Scene rebootedScene; + responseData["success"] = false; + responseData["accepted"] = true; if (!m_application.SceneManager.TryGetScene(regionID, out rebootedScene)) throw new Exception("region not found"); responseData["rebooting"] = true; + + IRestartModule restartModule = rebootedScene.RequestModuleInterface(); + if (restartModule != null) + { + List times = new List { 30, 15 }; + + restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true); + responseData["success"] = true; + } response.Value = responseData; - rebootedScene.Restart(30); + } catch (Exception e) { -- cgit v1.1