aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-02-27 22:25:03 +0000
committerJustin Clark-Casey (justincc)2013-02-27 22:25:03 +0000
commit647cb278c714f86c945a449bfecc901982d96687 (patch)
tree463e5256b3f446e4ee1fe54372dc863d9e67b558 /OpenSim/Region/Application
parentDo not have the Freeswitch connector on by default in Robust ini example files. (diff)
downloadopensim-SC_OLD-647cb278c714f86c945a449bfecc901982d96687.zip
opensim-SC_OLD-647cb278c714f86c945a449bfecc901982d96687.tar.gz
opensim-SC_OLD-647cb278c714f86c945a449bfecc901982d96687.tar.bz2
opensim-SC_OLD-647cb278c714f86c945a449bfecc901982d96687.tar.xz
Get "show modules" console command to show modules in alphabetical order, and group shared and non-shared modules together
This is to make it easier to tell if a region has a certain module active or not
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs27
1 files changed, 20 insertions, 7 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index c4731a3..20e00e3 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -30,6 +30,7 @@ using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Diagnostics; 31using System.Diagnostics;
32using System.IO; 32using System.IO;
33using System.Linq;
33using System.Reflection; 34using System.Reflection;
34using System.Text; 35using System.Text;
35using System.Text.RegularExpressions; 36using System.Text.RegularExpressions;
@@ -809,15 +810,27 @@ namespace OpenSim
809 810
810 case "modules": 811 case "modules":
811 SceneManager.ForEachScene( 812 SceneManager.ForEachScene(
812 delegate(Scene scene) { 813 scene =>
813 MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:");
814 foreach (IRegionModuleBase module in scene.RegionModules.Values)
815 { 814 {
816 Type type = module.GetType().GetInterface("ISharedRegionModule"); 815 MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
817 string module_type = type != null ? "Shared" : "Non-Shared"; 816
818 MainConsole.Instance.OutputFormat("New Region Module ({0}): {1}", module_type, module.Name); 817 List<IRegionModuleBase> sharedModules = new List<IRegionModuleBase>();
818 List<IRegionModuleBase> nonSharedModules = new List<IRegionModuleBase>();
819
820 foreach (IRegionModuleBase module in scene.RegionModules.Values)
821 {
822 if (module.GetType().GetInterface("ISharedRegionModule") != null)
823 nonSharedModules.Add(module);
824 else
825 sharedModules.Add(module);
826 }
827
828 foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
829 MainConsole.Instance.OutputFormat("New Region Module (Shared): {0}", module.Name);
830
831 foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
832 MainConsole.Instance.OutputFormat("New Region Module (Non-Shared): {0}", module.Name);
819 } 833 }
820 }
821 ); 834 );
822 835
823 MainConsole.Instance.Output(""); 836 MainConsole.Instance.Output("");