aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs17
1 files changed, 12 insertions, 5 deletions
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
208 208
209 UUID regionID = new UUID((string) requestData["regionID"]); 209 UUID regionID = new UUID((string) requestData["regionID"]);
210 210
211 responseData["accepted"] = true;
212 responseData["success"] = true;
213 response.Value = responseData;
214
215 Scene rebootedScene; 211 Scene rebootedScene;
216 212
213 responseData["success"] = false;
214 responseData["accepted"] = true;
217 if (!m_application.SceneManager.TryGetScene(regionID, out rebootedScene)) 215 if (!m_application.SceneManager.TryGetScene(regionID, out rebootedScene))
218 throw new Exception("region not found"); 216 throw new Exception("region not found");
219 217
220 responseData["rebooting"] = true; 218 responseData["rebooting"] = true;
219
220 IRestartModule restartModule = rebootedScene.RequestModuleInterface<IRestartModule>();
221 if (restartModule != null)
222 {
223 List<int> times = new List<int> { 30, 15 };
224
225 restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true);
226 responseData["success"] = true;
227 }
221 response.Value = responseData; 228 response.Value = responseData;
222 rebootedScene.Restart(30); 229
223 } 230 }
224 catch (Exception e) 231 catch (Exception e)
225 { 232 {