aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 4ebe207..51a647d 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -86,6 +86,9 @@ namespace OpenSim
86 86
87 private string m_assetStorage = "sqlite"; 87 private string m_assetStorage = "sqlite";
88 88
89 private string m_timedScript = "disabled";
90 private System.Timers.Timer m_scriptTimer;
91
89 public ConsoleCommand CreateAccount = null; 92 public ConsoleCommand CreateAccount = null;
90 private bool m_dumpAssetsToFile; 93 private bool m_dumpAssetsToFile;
91 94
@@ -236,6 +239,8 @@ namespace OpenSim
236 m_scriptEngine = startupConfig.GetString("script_engine", "DotNetEngine"); 239 m_scriptEngine = startupConfig.GetString("script_engine", "DotNetEngine");
237 240
238 m_assetStorage = startupConfig.GetString("asset_database", "sqlite"); 241 m_assetStorage = startupConfig.GetString("asset_database", "sqlite");
242
243 m_timedScript = startupConfig.GetString("timer_Script", "disabled");
239 } 244 }
240 245
241 IConfig standaloneConfig = m_config.Configs["StandAlone"]; 246 IConfig standaloneConfig = m_config.Configs["StandAlone"];
@@ -339,6 +344,14 @@ namespace OpenSim
339 344
340 MainLog.Instance.Status("STARTUP", 345 MainLog.Instance.Status("STARTUP",
341 "Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)"); 346 "Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)");
347
348 if (m_timedScript != "disabled")
349 {
350 m_scriptTimer = new System.Timers.Timer();
351 m_scriptTimer.Enabled = true;
352 m_scriptTimer.Interval = (int)(1200 * 1000);
353 m_scriptTimer.Elapsed += new System.Timers.ElapsedEventHandler(RunAutoTimerScript);
354 }
342 } 355 }
343 356
344 public UDPServer CreateRegion(RegionInfo regionInfo) 357 public UDPServer CreateRegion(RegionInfo regionInfo)
@@ -523,6 +536,13 @@ namespace OpenSim
523 Environment.Exit(0); 536 Environment.Exit(0);
524 } 537 }
525 538
539 private void RunAutoTimerScript(object sender, EventArgs e)
540 {
541 if (m_timedScript != "disabled")
542 {
543 RunCommandScript(m_timedScript);
544 }
545 }
526 #region Console Commands 546 #region Console Commands
527 547
528 /// <summary> 548 /// <summary>