diff options
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index a7ff0e2..4d56147 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -198,6 +198,46 @@ namespace OpenSim | |||
198 | 198 | ||
199 | // Only enable logins to the regions once we have completely finished starting up (apart from scripts) | 199 | // Only enable logins to the regions once we have completely finished starting up (apart from scripts) |
200 | m_commsManager.GridService.RegionLoginsEnabled = true; | 200 | m_commsManager.GridService.RegionLoginsEnabled = true; |
201 | |||
202 | List<string> topics = GetHelpTopics(); | ||
203 | |||
204 | foreach (string topic in topics) | ||
205 | { | ||
206 | m_console.Commands.AddCommand("plugin", "help "+topic, | ||
207 | "help "+topic, | ||
208 | "Get help on plugin command '"+topic+"'", | ||
209 | HandleCommanderHelp); | ||
210 | |||
211 | m_console.Commands.AddCommand("plugin", topic, | ||
212 | topic, | ||
213 | "Execute subcommand for plugin '"+topic+"'", | ||
214 | null); | ||
215 | |||
216 | ICommander commander = | ||
217 | SceneManager.CurrentOrFirstScene.GetCommanders()[topic]; | ||
218 | |||
219 | if (commander == null) | ||
220 | continue; | ||
221 | |||
222 | foreach (string command in commander.Commands.Keys) | ||
223 | { | ||
224 | m_console.Commands.AddCommand(topic, topic+" "+command, | ||
225 | topic+" "+commander.Commands[command].ShortHelp(), | ||
226 | String.Empty, HandleCommanderCommand); | ||
227 | } | ||
228 | } | ||
229 | } | ||
230 | |||
231 | private void HandleCommanderCommand(string module, string[] cmd) | ||
232 | { | ||
233 | m_sceneManager.SendCommandToPluginModules(cmd); | ||
234 | } | ||
235 | |||
236 | private void HandleCommanderHelp(string module, string[] cmd) | ||
237 | { | ||
238 | ICommander moduleCommander = SceneManager.CurrentOrFirstScene.GetCommander(cmd[1]); | ||
239 | if (moduleCommander != null) | ||
240 | m_console.Notice(moduleCommander.Help); | ||
201 | } | 241 | } |
202 | 242 | ||
203 | /// <summary> | 243 | /// <summary> |