diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneBase.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index b0f328d..3f5c781 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs | |||
@@ -460,11 +460,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
460 | } | 460 | } |
461 | } | 461 | } |
462 | 462 | ||
463 | public void AddCommand(string module, string command, string shorthelp, string longhelp, CommandDelegate callback) | 463 | public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback) |
464 | { | 464 | { |
465 | if (MainConsole.Instance == null) | 465 | if (MainConsole.Instance == null) |
466 | return; | 466 | return; |
467 | MainConsole.Instance.Commands.AddCommand(module, command, shorthelp, longhelp, callback); | 467 | |
468 | string modulename = String.Empty; | ||
469 | bool shared = false; | ||
470 | |||
471 | if (mod != null) | ||
472 | { | ||
473 | if (!(mod is IRegionModule)) | ||
474 | throw new Exception("AddCommand module parameter must be IRegionModule"); | ||
475 | IRegionModule module = (IRegionModule)mod; | ||
476 | modulename = module.Name; | ||
477 | shared = module.IsSharedModule; | ||
478 | } | ||
479 | |||
480 | MainConsole.Instance.Commands.AddCommand(modulename, shared, command, shorthelp, longhelp, callback); | ||
468 | } | 481 | } |
469 | } | 482 | } |
470 | } | 483 | } |