From d263a044b1ebb13477b2b391637ccc2da4368838 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 25 Nov 2007 04:52:14 +0000 Subject: * Added the ability to restart your individual sims from within them using the estate tools. * The sims properly restart, however they don't yet notify the existing avatars that they are up. To see the sim again, you'll need to log-out and back in until I can figure out how to get the proper data to the sims and to the avatar so they reconnect again. --- .../LoadRegions/LoadRegionsPlugin.cs | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/ApplicationPlugins/LoadRegions') 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 regionLoader.SetIniConfigSource(openSim.ConfigSource); RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); - + openSim.ModuleLoader.LoadDefaultSharedModules(); for (int i = 0; i < regionsToLoad.Length; i++) @@ -49,7 +49,34 @@ namespace OpenSim.ApplicationPlugins.LoadRegions openSim.ModuleLoader.PostInitialise(); openSim.ModuleLoader.ClearCache(); } + public void LoadRegionFromConfig(OpenSimMain openSim, ulong regionhandle) + { + System.Console.WriteLine("Load Regions addin being initialised"); + + IRegionLoader regionLoader; + if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") + { + MainLog.Instance.Notice("Loading Region Info from filesystem"); + regionLoader = new RegionLoaderFileSystem(); + } + else + { + MainLog.Instance.Notice("Loading Region Info from web"); + regionLoader = new RegionLoaderWebServer(); + } + regionLoader.SetIniConfigSource(openSim.ConfigSource); + RegionInfo[] regionsToLoad = regionLoader.LoadRegions(); + for (int i = 0; i < regionsToLoad.Length; i++) + { + if (regionhandle == regionsToLoad[i].RegionHandle) + { + MainLog.Instance.Debug("Creating Region: " + regionsToLoad[i].RegionName); + openSim.CreateRegion(regionsToLoad[i]); + } + } + + } public void Close() { -- cgit v1.1