diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs | 11 |
3 files changed, 18 insertions, 9 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index bf44274..2045b56 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim | |||
35 | { | 35 | { |
36 | public class Application | 36 | public class Application |
37 | { | 37 | { |
38 | public static string iniFilePath = ""; | ||
39 | |||
38 | //could move our main function into OpenSimMain and kill this class | 40 | //could move our main function into OpenSimMain and kill this class |
39 | [STAThread] | 41 | [STAThread] |
40 | public static void Main(string[] args) | 42 | public static void Main(string[] args) |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 70f9fd0..ad5a960 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -125,21 +125,21 @@ namespace OpenSim | |||
125 | AddinManager.Initialize("."); | 125 | AddinManager.Initialize("."); |
126 | AddinManager.Registry.Update(null); | 126 | AddinManager.Registry.Update(null); |
127 | 127 | ||
128 | string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); | 128 | Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); |
129 | 129 | ||
130 | m_config = new IniConfigSource(); | 130 | m_config = new IniConfigSource(); |
131 | //check for .INI file (either default or name passed in command line) | 131 | //check for .INI file (either default or name passed in command line) |
132 | if (File.Exists(iniFilePath)) | 132 | if (File.Exists(Application.iniFilePath)) |
133 | { | 133 | { |
134 | m_config.Merge(new IniConfigSource(iniFilePath)); | 134 | m_config.Merge(new IniConfigSource(Application.iniFilePath)); |
135 | m_config.Merge(configSource); | 135 | m_config.Merge(configSource); |
136 | } | 136 | } |
137 | else | 137 | else |
138 | { | 138 | { |
139 | iniFilePath = Path.Combine(Util.configDir(), iniFilePath); | 139 | Application.iniFilePath = Path.Combine(Util.configDir(), Application.iniFilePath); |
140 | if (File.Exists(iniFilePath)) | 140 | if (File.Exists(Application.iniFilePath)) |
141 | { | 141 | { |
142 | m_config.Merge(new IniConfigSource(iniFilePath)); | 142 | m_config.Merge(new IniConfigSource(Application.iniFilePath)); |
143 | m_config.Merge(configSource); | 143 | m_config.Merge(configSource); |
144 | } | 144 | } |
145 | else | 145 | else |
@@ -149,7 +149,7 @@ namespace OpenSim | |||
149 | 149 | ||
150 | m_config.Merge(configSource); | 150 | m_config.Merge(configSource); |
151 | 151 | ||
152 | m_config.Save(iniFilePath); | 152 | m_config.Save(Application.iniFilePath); |
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index c237282..a6d1019 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | 29 | ||
30 | using System; | 30 | using System; |
31 | using System.IO; | ||
31 | using Nini.Config; | 32 | using Nini.Config; |
32 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
33 | using OpenSim.Region.Environment.Interfaces; | 34 | using OpenSim.Region.Environment.Interfaces; |
@@ -128,8 +129,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
128 | RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 0); | 129 | RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 0); |
129 | 130 | ||
130 | // Reload from disk | 131 | // Reload from disk |
131 | ConfigSource.Reload(); | 132 | //ConfigSource.Reload(); |
132 | // Create a new object (probably not necessary?) | 133 | if (File.Exists(OpenSim.Application.iniFilePath)) |
134 | { | ||
135 | //ConfigSource.Merge(new IniConfigSource(OpenSim.Application.iniFilePath)); | ||
136 | } | ||
137 | |||
138 | |||
139 | // Create a new object (probably not necessary?) | ||
133 | // ScriptConfigSource = ConfigSource.Configs[ScriptEngineName]; | 140 | // ScriptConfigSource = ConfigSource.Configs[ScriptEngineName]; |
134 | 141 | ||
135 | if (m_EventQueueManager != null) m_EventQueueManager.ReadConfig(); | 142 | if (m_EventQueueManager != null) m_EventQueueManager.ReadConfig(); |