diff options
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 0dc9306..9d36986 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -158,10 +158,27 @@ namespace OpenSim | |||
158 | 158 | ||
159 | protected virtual void LoadPlugins() | 159 | protected virtual void LoadPlugins() |
160 | { | 160 | { |
161 | using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this))) | 161 | IConfig startupConfig = Config.Configs["Startup"]; |
162 | string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation", String.Empty) : String.Empty; | ||
163 | |||
164 | // The location can also be specified in the environment. If there | ||
165 | // is no location in the configuration, we must call the constructor | ||
166 | // without a location parameter to allow that to happen. | ||
167 | if (registryLocation == String.Empty) | ||
162 | { | 168 | { |
163 | loader.Load("/OpenSim/Startup"); | 169 | using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this))) |
164 | m_plugins = loader.Plugins; | 170 | { |
171 | loader.Load("/OpenSim/Startup"); | ||
172 | m_plugins = loader.Plugins; | ||
173 | } | ||
174 | } | ||
175 | else | ||
176 | { | ||
177 | using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this), registryLocation)) | ||
178 | { | ||
179 | loader.Load("/OpenSim/Startup"); | ||
180 | m_plugins = loader.Plugins; | ||
181 | } | ||
165 | } | 182 | } |
166 | } | 183 | } |
167 | 184 | ||
@@ -1049,4 +1066,4 @@ namespace OpenSim | |||
1049 | { | 1066 | { |
1050 | public IConfigSource Source; | 1067 | public IConfigSource Source; |
1051 | } | 1068 | } |
1052 | } \ No newline at end of file | 1069 | } |