aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs')
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs29
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
index e8509fc..3c12d58 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
@@ -37,7 +37,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
37 37
38 regionLoader.SetIniConfigSource(openSim.ConfigSource); 38 regionLoader.SetIniConfigSource(openSim.ConfigSource);
39 RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); 39 RegionInfo[] regionsToLoad = regionLoader.LoadRegions();
40 40
41 openSim.ModuleLoader.LoadDefaultSharedModules(); 41 openSim.ModuleLoader.LoadDefaultSharedModules();
42 42
43 for (int i = 0; i < regionsToLoad.Length; i++) 43 for (int i = 0; i < regionsToLoad.Length; i++)
@@ -49,7 +49,34 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
49 openSim.ModuleLoader.PostInitialise(); 49 openSim.ModuleLoader.PostInitialise();
50 openSim.ModuleLoader.ClearCache(); 50 openSim.ModuleLoader.ClearCache();
51 } 51 }
52 public void LoadRegionFromConfig(OpenSimMain openSim, ulong regionhandle)
53 {
54 System.Console.WriteLine("Load Regions addin being initialised");
55
56 IRegionLoader regionLoader;
57 if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem")
58 {
59 MainLog.Instance.Notice("Loading Region Info from filesystem");
60 regionLoader = new RegionLoaderFileSystem();
61 }
62 else
63 {
64 MainLog.Instance.Notice("Loading Region Info from web");
65 regionLoader = new RegionLoaderWebServer();
66 }
52 67
68 regionLoader.SetIniConfigSource(openSim.ConfigSource);
69 RegionInfo[] regionsToLoad = regionLoader.LoadRegions();
70 for (int i = 0; i < regionsToLoad.Length; i++)
71 {
72 if (regionhandle == regionsToLoad[i].RegionHandle)
73 {
74 MainLog.Instance.Debug("Creating Region: " + regionsToLoad[i].RegionName);
75 openSim.CreateRegion(regionsToLoad[i]);
76 }
77 }
78
79 }
53 public void Close() 80 public void Close()
54 { 81 {
55 82