diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/ModuleLoader.cs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index cb72638..c64795b 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs | |||
@@ -194,19 +194,26 @@ namespace OpenSim.Region.Environment | |||
194 | 194 | ||
195 | if (pluginAssembly != null) | 195 | if (pluginAssembly != null) |
196 | { | 196 | { |
197 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 197 | try |
198 | { | 198 | { |
199 | if (pluginType.IsPublic) | 199 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
200 | { | 200 | { |
201 | if (!pluginType.IsAbstract) | 201 | if (pluginType.IsPublic) |
202 | { | 202 | { |
203 | if (pluginType.GetInterface("IRegionModule") != null) | 203 | if (!pluginType.IsAbstract) |
204 | { | 204 | { |
205 | modules.Add((IRegionModule) Activator.CreateInstance(pluginType)); | 205 | if (pluginType.GetInterface("IRegionModule") != null) |
206 | { | ||
207 | modules.Add((IRegionModule)Activator.CreateInstance(pluginType)); | ||
208 | } | ||
206 | } | 209 | } |
207 | } | 210 | } |
208 | } | 211 | } |
209 | } | 212 | } |
213 | catch( ReflectionTypeLoadException ) | ||
214 | { | ||
215 | m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName ); | ||
216 | } | ||
210 | } | 217 | } |
211 | 218 | ||
212 | return modules.ToArray(); | 219 | return modules.ToArray(); |