aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorCasperW2009-11-26 15:17:44 +0100
committerCasperW2009-11-26 15:17:44 +0100
commitac2fcbe224d4877dccc4d73e9c58771e40a4ae1c (patch)
tree0a3b8af2b488d06dab952322bd46b2157cd8838a /OpenSim/Region/Framework
parentAdded animation support for my last commit (diff)
downloadopensim-SC-ac2fcbe224d4877dccc4d73e9c58771e40a4ae1c.zip
opensim-SC-ac2fcbe224d4877dccc4d73e9c58771e40a4ae1c.tar.gz
opensim-SC-ac2fcbe224d4877dccc4d73e9c58771e40a4ae1c.tar.bz2
opensim-SC-ac2fcbe224d4877dccc4d73e9c58771e40a4ae1c.tar.xz
Improvements to rAdmin admin_shutdown and admin_restart. Both methods can now accept a parameter of noticetype = dialog in order to display a blue persistant dropdown instead of a short notice. Added an optional and configurable delay to the restart method, defaulting at 30 seconds as before. Both methods can also accept a noticetype = none dialog in order to act silently.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 4ffa1a2..be1d4bf 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -873,6 +873,15 @@ namespace OpenSim.Region.Framework.Scenes
873 /// <param name="seconds">float indicating duration before restart.</param> 873 /// <param name="seconds">float indicating duration before restart.</param>
874 public virtual void Restart(float seconds) 874 public virtual void Restart(float seconds)
875 { 875 {
876 Restart(seconds, true);
877 }
878
879 /// <summary>
880 /// Given float seconds, this will restart the region. showDialog will optionally alert the users.
881 /// </summary>
882 /// <param name="seconds">float indicating duration before restart.</param>
883 public virtual void Restart(float seconds, bool showDialog)
884 {
876 // notifications are done in 15 second increments 885 // notifications are done in 15 second increments
877 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request 886 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request
878 // It's a 'Cancel restart' request. 887 // It's a 'Cancel restart' request.
@@ -893,8 +902,11 @@ namespace OpenSim.Region.Framework.Scenes
893 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); 902 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
894 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); 903 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
895 m_restartTimer.Start(); 904 m_restartTimer.Start();
896 m_dialogModule.SendNotificationToUsersInRegion( 905 if (showDialog)
897 UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); 906 {
907 m_dialogModule.SendNotificationToUsersInRegion(
908 UUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " + (seconds / 60).ToString() + " Minutes");
909 }
898 } 910 }
899 } 911 }
900 912