From c53c55fed02d02af419fb2968764fcefa5faac37 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Tue, 12 Jun 2012 17:07:10 -0400 Subject: Add variable timer configureation for the timer_Script Added "timer_Interval" to the OpenSimDefaults.ini, leaving the default value set to 1200, as the previous default setting. The value represents seconds. To change the default, copy the entry to OpenSim.ini and multiply the number of minutes for the interval by 60. --- OpenSim/Region/Application/OpenSim.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 9c38ebe..57a3c69 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -70,6 +70,7 @@ namespace OpenSim private Regex m_consolePromptRegex = new Regex(@"([^\\])\\(\w)", RegexOptions.Compiled); private string m_timedScript = "disabled"; + private int m_timeInterval = 1200; private Timer m_scriptTimer; public OpenSim(IConfigSource configSource) : base(configSource) @@ -99,6 +100,10 @@ namespace OpenSim m_consolePort = (uint)networkConfig.GetInt("console_port", 0); m_timedScript = startupConfig.GetString("timer_Script", "disabled"); + if (m_timedScript != "disabled") + { + m_timeInterval = startupConfig.GetInt("timer_Interval", 1200); + } if (m_logFileAppender != null) { @@ -216,7 +221,7 @@ namespace OpenSim { m_scriptTimer = new Timer(); m_scriptTimer.Enabled = true; - m_scriptTimer.Interval = 1200*1000; + m_scriptTimer.Interval = m_timeInterval*1000; m_scriptTimer.Elapsed += RunAutoTimerScript; } } -- cgit v1.1