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/Environment/ModuleLoader.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/ModuleLoader.cs') diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index 43ca7bd..52a6fbd 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs @@ -62,14 +62,16 @@ namespace OpenSim.Region.Environment } } - public void PickupModules(Scene scene, string moduleDir) + public List PickupModules(Scene scene, string moduleDir) { DirectoryInfo dir = new DirectoryInfo(moduleDir); + List modules = new List(); foreach (FileInfo fileInfo in dir.GetFiles("*.dll")) { - LoadRegionModules(fileInfo.FullName, scene); + modules.AddRange(LoadRegionModules(fileInfo.FullName, scene)); } + return modules; } public void LoadDefaultSharedModules() @@ -190,9 +192,10 @@ namespace OpenSim.Region.Environment } } - public void LoadRegionModules(string dllName, Scene scene) + public List LoadRegionModules(string dllName, Scene scene) { IRegionModule[] modules = LoadModules(dllName); + List initializedModules = new List(); if (modules.Length > 0) { @@ -203,6 +206,7 @@ namespace OpenSim.Region.Environment { m_log.InfoFormat("[MODULES]: [{0}]: Initializing.", module.Name); InitializeModule(module, scene); + initializedModules.Add(module); } else { @@ -211,6 +215,7 @@ namespace OpenSim.Region.Environment } } } + return initializedModules; } public void LoadRegionModule(string dllName, string moduleName, Scene scene) -- cgit v1.1