diff options
author | Jeff Ames | 2008-06-09 08:46:33 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-09 08:46:33 +0000 |
commit | dfb63b56230bdd3bfd897d499ce977ea9ee9891d (patch) | |
tree | 1d340aa26183382142d5df917388eacc3084033c /OpenSim/Region/Application | |
parent | Mantis#1469. Thank you kindly, Mikem for a patch that addresses: (diff) | |
download | opensim-SC_OLD-dfb63b56230bdd3bfd897d499ce977ea9ee9891d.zip opensim-SC_OLD-dfb63b56230bdd3bfd897d499ce977ea9ee9891d.tar.gz opensim-SC_OLD-dfb63b56230bdd3bfd897d499ce977ea9ee9891d.tar.bz2 opensim-SC_OLD-dfb63b56230bdd3bfd897d499ce977ea9ee9891d.tar.xz |
Update svn properties. Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 105 |
1 files changed, 53 insertions, 52 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index a903fd8..64ea157 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -677,60 +677,61 @@ namespace OpenSim | |||
677 | return result; | 677 | return result; |
678 | } | 678 | } |
679 | 679 | ||
680 | /// <summary> | 680 | /// <summary> |
681 | /// Runs the best matching plugin command | 681 | /// Runs the best matching plugin command |
682 | /// | 682 | /// |
683 | /// returns true if a match was found, false otherwise. | 683 | /// returns true if a match was found, false otherwise. |
684 | /// </summary> | 684 | /// </summary> |
685 | public bool RunPluginCommands(string cmdWithParams) | 685 | public bool RunPluginCommands(string cmdWithParams) |
686 | { | 686 | { |
687 | ConsolePluginCommand bestMatch = null; | 687 | ConsolePluginCommand bestMatch = null; |
688 | int bestLength = 0; | 688 | int bestLength = 0; |
689 | foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos) | 689 | foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos) |
690 | { | 690 | { |
691 | int matchLen = cmdinfo.matchLength(cmdWithParams); | 691 | int matchLen = cmdinfo.matchLength(cmdWithParams); |
692 | if (matchLen > bestLength) | 692 | if (matchLen > bestLength) |
693 | { | 693 | { |
694 | bestMatch = cmdinfo; | 694 | bestMatch = cmdinfo; |
695 | bestLength = matchLen; | 695 | bestLength = matchLen; |
696 | } | 696 | } |
697 | } | 697 | } |
698 | if (bestMatch == null) return false; | 698 | if (bestMatch == null) return false; |
699 | bestMatch.Run(cmdWithParams.Substring(bestLength)); | 699 | bestMatch.Run(cmdWithParams.Substring(bestLength)); |
700 | return true; | 700 | return true; |
701 | } | 701 | } |
702 | 702 | ||
703 | /// <summary> | 703 | /// <summary> |
704 | /// Show the matching plugins command help | 704 | /// Show the matching plugins command help |
705 | /// </summary> | 705 | /// </summary> |
706 | public void ShowPluginCommandsHelp(string cmdWithParams, ConsoleBase console) | 706 | public void ShowPluginCommandsHelp(string cmdWithParams, ConsoleBase console) |
707 | { | 707 | { |
708 | foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos) | 708 | foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos) |
709 | { | 709 | { |
710 | if (cmdinfo.IsHelpfull(cmdWithParams)) | 710 | if (cmdinfo.IsHelpfull(cmdWithParams)) |
711 | { | 711 | { |
712 | cmdinfo.ShowHelp(console); | 712 | cmdinfo.ShowHelp(console); |
713 | } | 713 | } |
714 | } | 714 | } |
715 | } | 715 | } |
716 | 716 | ||
717 | /// <summary> | 717 | /// <summary> |
718 | /// Registers a new console plugin command | 718 | /// Registers a new console plugin command |
719 | /// </summary> | 719 | /// </summary> |
720 | public static void RegisterCmd(string cmd, ConsoleCommand deligate, string help) | 720 | public static void RegisterCmd(string cmd, ConsoleCommand deligate, string help) |
721 | { | 721 | { |
722 | RegisterConsolePluginCommand(new ConsolePluginCommand(cmd, deligate, help)); | 722 | RegisterConsolePluginCommand(new ConsolePluginCommand(cmd, deligate, help)); |
723 | } | 723 | } |
724 | /// <summary> | 724 | |
725 | /// Registers a new console plugin command | 725 | /// <summary> |
726 | /// </summary> | 726 | /// Registers a new console plugin command |
727 | public static void RegisterConsolePluginCommand(ConsolePluginCommand pluginCommand) | 727 | /// </summary> |
728 | { | 728 | public static void RegisterConsolePluginCommand(ConsolePluginCommand pluginCommand) |
729 | m_PluginCommandInfos.Add(pluginCommand); | 729 | { |
730 | } | 730 | m_PluginCommandInfos.Add(pluginCommand); |
731 | } | ||
731 | #endregion | 732 | #endregion |
733 | } | ||
732 | 734 | ||
733 | } | ||
734 | /// <summary> | 735 | /// <summary> |
735 | /// Holder object for a new console plugin command | 736 | /// Holder object for a new console plugin command |
736 | /// | 737 | /// |