aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs63
1 files changed, 29 insertions, 34 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index f845bf8..5301e96 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -197,17 +197,20 @@ namespace OpenSim
197 ReadConfigSettings(); 197 ReadConfigSettings();
198 } 198 }
199 199
200 /// <summary>
201 /// Setup a default config values in case they aren't present in the ini file
202 /// </summary>
203 /// <returns></returns>
200 public static IConfigSource DefaultConfig() 204 public static IConfigSource DefaultConfig()
201 { 205 {
202 IConfigSource DefaultConfig = new IniConfigSource(); 206 IConfigSource DefaultConfig = new IniConfigSource();
203 if (DefaultConfig.Configs["Startup"] == null) 207
204 { 208 {
205 DefaultConfig.AddConfig("Startup"); 209 IConfig config = DefaultConfig.Configs["Startup"];
206 } 210
211 if (null == config)
212 config = DefaultConfig.AddConfig("Startup");
207 213
208 IConfig config = DefaultConfig.Configs["Startup"];
209 if (config != null)
210 {
211 config.Set("gridmode", false); 214 config.Set("gridmode", false);
212 config.Set("physics", "basicphysics"); 215 config.Set("physics", "basicphysics");
213 config.Set("physical_prim", true); 216 config.Set("physical_prim", true);
@@ -224,15 +227,13 @@ namespace OpenSim
224 config.Set("asset_database", "sqlite"); 227 config.Set("asset_database", "sqlite");
225 config.Set("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); 228 config.Set("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll");
226 } 229 }
227 230
228 if (DefaultConfig.Configs["StandAlone"] == null)
229 { 231 {
230 DefaultConfig.AddConfig("StandAlone"); 232 IConfig config = DefaultConfig.Configs["StandAlone"];
231 } 233
234 if (null == config)
235 config = DefaultConfig.AddConfig("StandAlone");
232 236
233 config = DefaultConfig.Configs["StandAlone"];
234 if (config != null)
235 {
236 config.Set("accounts_authenticate", false); 237 config.Set("accounts_authenticate", false);
237 config.Set("welcome_message", "Welcome to OpenSimulator"); 238 config.Set("welcome_message", "Welcome to OpenSimulator");
238 config.Set("inventory_plugin", "OpenSim.Data.SQLite.dll"); 239 config.Set("inventory_plugin", "OpenSim.Data.SQLite.dll");
@@ -243,15 +244,13 @@ namespace OpenSim
243 config.Set("asset_source", ""); 244 config.Set("asset_source", "");
244 config.Set("dump_assets_to_file", false); 245 config.Set("dump_assets_to_file", false);
245 } 246 }
246 247
247 if (DefaultConfig.Configs["Network"] == null)
248 { 248 {
249 DefaultConfig.AddConfig("Network"); 249 IConfig config = DefaultConfig.Configs["Network"];
250 } 250
251 if (null == config)
252 config = DefaultConfig.AddConfig("Network");
251 253
252 config = DefaultConfig.Configs["Network"];
253 if (config != null)
254 {
255 config.Set("default_location_x", 1000); 254 config.Set("default_location_x", 1000);
256 config.Set("default_location_y", 1000); 255 config.Set("default_location_y", 1000);
257 config.Set("http_listener_port", NetworkServersInfo.DefaultHttpListenerPort); 256 config.Set("http_listener_port", NetworkServersInfo.DefaultHttpListenerPort);
@@ -266,26 +265,22 @@ namespace OpenSim
266 config.Set("inventory_server_url", "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString()); 265 config.Set("inventory_server_url", "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString());
267 config.Set("secure_inventory_server", "true"); 266 config.Set("secure_inventory_server", "true");
268 } 267 }
269 268
270 if (DefaultConfig.Configs["RemoteAdmin"] == null)
271 { 269 {
272 DefaultConfig.AddConfig("RemoteAdmin"); 270 IConfig config = DefaultConfig.Configs["RemoteAdmin"];
273 } 271
272 if (null == config)
273 config = DefaultConfig.AddConfig("RemoteAdmin");
274 274
275 config = DefaultConfig.Configs["RemoteAdmin"];
276 if (config != null)
277 {
278 config.Set("enabled", "false"); 275 config.Set("enabled", "false");
279 } 276 }
280 277
281 if (DefaultConfig.Configs["Voice"] == null)
282 { 278 {
283 DefaultConfig.AddConfig("Voice"); 279 IConfig config = DefaultConfig.Configs["Voice"];
284 } 280
281 if (null == config)
282 config = DefaultConfig.AddConfig("Voice");
285 283
286 config = DefaultConfig.Configs["Voice"];
287 if (config != null)
288 {
289 config.Set("enabled", "false"); 284 config.Set("enabled", "false");
290 } 285 }
291 286