From bf1580fba45df7624180b07599c8170074500c99 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 21 Apr 2008 12:42:56 +0000 Subject: From: Dr Scofield the attached patch set is centered around RemoteAdminPlugin and focuses mainly on making it more robust (i.e. more parameter checking and better error reporting) but also we've re-implemented the LoadTerrain stuff that got disabled during the terrain code reworking: * missing PostInitialize() calls on region modules that were loaded for regions created via RemoteAdmin's CreateRegion XmlRpc call * re-implements RemoteAdmin's LoadTerrain XmlRpc call (probably lost during the TerrainModule rework) * adds lots more parameter checking and error reporting to RemoteAdmin * adds a read-only property to RegionApplicationBase so that we can access the CommsManager * adds Exceptions to TerrainModule so that we get better error case feedback (and can report more meaningful errors in turn) * adds a CheckForTerrainUpdate() call to TerrainModule.LoadFromFile() to make terrain changes effective * adds TryGetCurrentScene(LLUUID) to SceneManager so that we can retrieve Scenes not only by name but also by LLUUID cheers, dr scofield --- OpenSim/Region/Application/OpenSimMain.cs | 33 +++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Application/OpenSimMain.cs') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index aa08f81..26ae525 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -462,7 +462,28 @@ namespace OpenSim /// /// /// - public UDPServer CreateRegion(RegionInfo regionInfo, bool portadd_flag) + public UDPServer CreateRegion(RegionInfo regionInfo, bool portadd_flag) { + return CreateRegion(regionInfo, portadd_flag, false); + } + + /// + /// Execute the region creation process. This includes setting up scene infrastructure. + /// + /// + /// + /// + public UDPServer CreateRegion(RegionInfo regionInfo) { + return CreateRegion(regionInfo, false, true); + } + + /// + /// Execute the region creation process. This includes setting up scene infrastructure. + /// + /// + /// + /// + /// + public UDPServer CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init) { int port = regionInfo.InternalEndPoint.Port; @@ -487,7 +508,7 @@ namespace OpenSim m_log.Info("[MODULES]: Loading Region's modules"); - m_moduleLoader.PickupModules(scene, "."); + List modules = m_moduleLoader.PickupModules(scene, "."); //m_moduleLoader.PickupModules(scene, "ScriptEngines"); //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene); @@ -536,6 +557,14 @@ namespace OpenSim m_regionData.Add(regionInfo); udpServer.ServerListener(); + if (do_post_init) + { + foreach (IRegionModule module in modules) + { + module.PostInitialise(); + } + } + return udpServer; } -- cgit v1.1