diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 196f7ffed2..91e50b65b3 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -30,6 +30,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Linq; using System.Reflection; using System.Text; using System.Text.RegularExpressions; @@ -846,15 +847,27 @@ namespace OpenSim ); SceneManager.ForEachScene( - delegate(Scene scene) { - MainConsole.Instance.Output("Loaded new region modules in" + scene.RegionInfo.RegionName + " are:"); - foreach (IRegionModuleBase module in scene.RegionModules.Values) + scene => { - Type type = module.GetType().GetInterface("ISharedRegionModule"); - string module_type = type != null ? "Shared" : "Non-Shared"; - MainConsole.Instance.OutputFormat("New Region Module ({0}): {1}", module_type, module.Name); + MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name); + + List sharedModules = new List(); + List nonSharedModules = new List(); + + foreach (IRegionModuleBase module in scene.RegionModules.Values) + { + if (module.GetType().GetInterface("ISharedRegionModule") != null) + nonSharedModules.Add(module); + else + sharedModules.Add(module); + } + + foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name)) + MainConsole.Instance.OutputFormat("New Region Module (Shared): {0}", module.Name); + + foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name)) + MainConsole.Instance.OutputFormat("New Region Module (Non-Shared): {0}", module.Name); } - } ); MainConsole.Instance.Output("");