diff options
author | Melanie | 2009-10-21 02:19:45 +0100 |
---|---|---|
committer | Melanie | 2009-10-21 02:19:45 +0100 |
commit | 2a886fd76c9df972fa3096d19b37047f7eda672f (patch) | |
tree | b40b4af467af8c72b48714c4d691aedbd2e67a63 /OpenSim/ApplicationPlugins/RegionModulesController | |
parent | Cleanup and comment the region module loader. Add support for configuring (diff) | |
download | opensim-SC_OLD-2a886fd76c9df972fa3096d19b37047f7eda672f.zip opensim-SC_OLD-2a886fd76c9df972fa3096d19b37047f7eda672f.tar.gz opensim-SC_OLD-2a886fd76c9df972fa3096d19b37047f7eda672f.tar.bz2 opensim-SC_OLD-2a886fd76c9df972fa3096d19b37047f7eda672f.tar.xz |
Really make module port selection work. Implement port setting in
LLProxyLoginModule.
Diffstat (limited to 'OpenSim/ApplicationPlugins/RegionModulesController')
-rw-r--r-- | OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 13cb34c..ddc37ed 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs | |||
@@ -93,7 +93,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
93 | { | 93 | { |
94 | // Get the config string | 94 | // Get the config string |
95 | string moduleString = | 95 | string moduleString = |
96 | modulesConfig.GetString(node.Id, String.Empty); | 96 | modulesConfig.GetString("Setup_" + node.Id, String.Empty); |
97 | 97 | ||
98 | // We have a selector | 98 | // We have a selector |
99 | if (moduleString != String.Empty) | 99 | if (moduleString != String.Empty) |
@@ -121,6 +121,31 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
121 | } | 121 | } |
122 | else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) | 122 | else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) |
123 | { | 123 | { |
124 | // Get the config string | ||
125 | string moduleString = | ||
126 | modulesConfig.GetString("Setup_" + node.Id, String.Empty); | ||
127 | |||
128 | // We have a selector | ||
129 | if (moduleString != String.Empty) | ||
130 | { | ||
131 | // Allow disabling modules even if they don't have | ||
132 | // support for it | ||
133 | if (moduleString == "disabled") | ||
134 | continue; | ||
135 | |||
136 | // Split off port, if present | ||
137 | string[] moduleParts = moduleString.Split(new char[] {'/'}, 2); | ||
138 | // Format is [port/][class] | ||
139 | string className = moduleParts[0]; | ||
140 | if (moduleParts.Length > 1) | ||
141 | className = moduleParts[1]; | ||
142 | |||
143 | // Match the class name if given | ||
144 | if (className != String.Empty && | ||
145 | node.Type.ToString() != className) | ||
146 | continue; | ||
147 | } | ||
148 | |||
124 | m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); | 149 | m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); |
125 | m_nonSharedModules.Add(node); | 150 | m_nonSharedModules.Add(node); |
126 | } | 151 | } |
@@ -137,11 +162,11 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
137 | // | 162 | // |
138 | foreach (TypeExtensionNode node in m_sharedModules) | 163 | foreach (TypeExtensionNode node in m_sharedModules) |
139 | { | 164 | { |
140 | Object[] ctorArgs = new Object[] {0}; | 165 | Object[] ctorArgs = new Object[] {(uint)0}; |
141 | 166 | ||
142 | // Read the config again | 167 | // Read the config again |
143 | string moduleString = | 168 | string moduleString = |
144 | modulesConfig.GetString(node.Id, String.Empty); | 169 | modulesConfig.GetString("Setup_" + node.Id, String.Empty); |
145 | 170 | ||
146 | // Get the port number, if there is one | 171 | // Get the port number, if there is one |
147 | if (moduleString != String.Empty) | 172 | if (moduleString != String.Empty) |
@@ -302,7 +327,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
302 | 327 | ||
303 | // Read the config | 328 | // Read the config |
304 | string moduleString = | 329 | string moduleString = |
305 | modulesConfig.GetString(node.Id, String.Empty); | 330 | modulesConfig.GetString("Setup_" + node.Id, String.Empty); |
306 | 331 | ||
307 | // Get the port number, if there is one | 332 | // Get the port number, if there is one |
308 | if (moduleString != String.Empty) | 333 | if (moduleString != String.Empty) |