aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/ModuleLoader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/ModuleLoader.cs')
-rw-r--r--OpenSim/Region/Environment/ModuleLoader.cs11
1 files changed, 8 insertions, 3 deletions
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
62 } 62 }
63 } 63 }
64 64
65 public void PickupModules(Scene scene, string moduleDir) 65 public List<IRegionModule> PickupModules(Scene scene, string moduleDir)
66 { 66 {
67 DirectoryInfo dir = new DirectoryInfo(moduleDir); 67 DirectoryInfo dir = new DirectoryInfo(moduleDir);
68 List<IRegionModule> modules = new List<IRegionModule>();
68 69
69 foreach (FileInfo fileInfo in dir.GetFiles("*.dll")) 70 foreach (FileInfo fileInfo in dir.GetFiles("*.dll"))
70 { 71 {
71 LoadRegionModules(fileInfo.FullName, scene); 72 modules.AddRange(LoadRegionModules(fileInfo.FullName, scene));
72 } 73 }
74 return modules;
73 } 75 }
74 76
75 public void LoadDefaultSharedModules() 77 public void LoadDefaultSharedModules()
@@ -190,9 +192,10 @@ namespace OpenSim.Region.Environment
190 } 192 }
191 } 193 }
192 194
193 public void LoadRegionModules(string dllName, Scene scene) 195 public List<IRegionModule> LoadRegionModules(string dllName, Scene scene)
194 { 196 {
195 IRegionModule[] modules = LoadModules(dllName); 197 IRegionModule[] modules = LoadModules(dllName);
198 List<IRegionModule> initializedModules = new List<IRegionModule>();
196 199
197 if (modules.Length > 0) 200 if (modules.Length > 0)
198 { 201 {
@@ -203,6 +206,7 @@ namespace OpenSim.Region.Environment
203 { 206 {
204 m_log.InfoFormat("[MODULES]: [{0}]: Initializing.", module.Name); 207 m_log.InfoFormat("[MODULES]: [{0}]: Initializing.", module.Name);
205 InitializeModule(module, scene); 208 InitializeModule(module, scene);
209 initializedModules.Add(module);
206 } 210 }
207 else 211 else
208 { 212 {
@@ -211,6 +215,7 @@ namespace OpenSim.Region.Environment
211 } 215 }
212 } 216 }
213 } 217 }
218 return initializedModules;
214 } 219 }
215 220
216 public void LoadRegionModule(string dllName, string moduleName, Scene scene) 221 public void LoadRegionModule(string dllName, string moduleName, Scene scene)