aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
authorMelanie2010-11-25 03:16:52 +0000
committerMelanie2010-11-25 03:16:52 +0000
commit57c4def254b85997f5b8a4cd4e7d1db550947290 (patch)
tree89c9521d8e208820ff54a1505088792b1eabb1a6 /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
parentFinish the RestartModule and fix some bugs. Add new console commands: (diff)
downloadopensim-SC-57c4def254b85997f5b8a4cd4e7d1db550947290.zip
opensim-SC-57c4def254b85997f5b8a4cd4e7d1db550947290.tar.gz
opensim-SC-57c4def254b85997f5b8a4cd4e7d1db550947290.tar.bz2
opensim-SC-57c4def254b85997f5b8a4cd4e7d1db550947290.tar.xz
Change all restarting to use the restart module. Remove hardcoded behavior
Diffstat (limited to '')
-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 {