aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs67
1 files changed, 22 insertions, 45 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 08e4023..a7e7d03 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;
@@ -158,6 +159,7 @@ namespace OpenSim
158 159
159 MainConsole.Instance = m_console; 160 MainConsole.Instance = m_console;
160 161
162 LogEnvironmentInformation();
161 RegisterCommonAppenders(Config.Configs["Startup"]); 163 RegisterCommonAppenders(Config.Configs["Startup"]);
162 RegisterConsoleCommands(); 164 RegisterConsoleCommands();
163 165
@@ -236,18 +238,6 @@ namespace OpenSim
236 + "If an avatar name is given then only packets from that avatar are logged", 238 + "If an avatar name is given then only packets from that avatar are logged",
237 Debug); 239 Debug);
238 240
239 m_console.Commands.AddCommand("Debug", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
240
241 m_console.Commands.AddCommand("Debug", false, "debug scene",
242 "debug scene active|collisions|physics|scripting|teleport true|false",
243 "Turn on scene debugging.",
244 "If active is false then main scene update and maintenance loops are suspended.\n"
245 + "If collisions is false then collisions with other objects are turned off.\n"
246 + "If physics is false then all physics objects are non-physical.\n"
247 + "If scripting is false then no scripting operations happen.\n"
248 + "If teleport is true then some extra teleport debug information is logged.",
249 Debug);
250
251 m_console.Commands.AddCommand("General", false, "change region", 241 m_console.Commands.AddCommand("General", false, "change region",
252 "change region <region name>", 242 "change region <region name>",
253 "Change current console region", ChangeSelectedRegion); 243 "Change current console region", ChangeSelectedRegion);
@@ -744,31 +734,6 @@ namespace OpenSim
744 734
745 break; 735 break;
746 736
747 case "scene":
748 if (args.Length == 4)
749 {
750 if (SceneManager.CurrentScene == null)
751 {
752 MainConsole.Instance.Output("Please use 'change region <regioname>' first");
753 }
754 else
755 {
756 string key = args[2];
757 string value = args[3];
758 SceneManager.CurrentScene.SetSceneCoreDebug(
759 new Dictionary<string, string>() { { key, value } });
760
761 MainConsole.Instance.OutputFormat("Set debug scene {0} = {1}", key, value);
762 }
763 }
764 else
765 {
766 MainConsole.Instance.Output(
767 "Usage: debug scene active|scripting|collisions|physics|teleport true|false");
768 }
769
770 break;
771
772 default: 737 default:
773 MainConsole.Instance.Output("Unknown debug command"); 738 MainConsole.Instance.Output("Unknown debug command");
774 break; 739 break;
@@ -845,16 +810,28 @@ namespace OpenSim
845 break; 810 break;
846 811
847 case "modules": 812 case "modules":
848 SceneManager.ForEachScene( 813 SceneManager.ForEachSelectedScene(
849 delegate(Scene scene) { 814 scene =>
850 MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:");
851 foreach (IRegionModuleBase module in scene.RegionModules.Values)
852 { 815 {
853 Type type = module.GetType().GetInterface("ISharedRegionModule"); 816 MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
854 string module_type = type != null ? "Shared" : "Non-Shared"; 817
855 MainConsole.Instance.OutputFormat("New Region Module ({0}): {1}", module_type, module.Name); 818 List<IRegionModuleBase> sharedModules = new List<IRegionModuleBase>();
819 List<IRegionModuleBase> nonSharedModules = new List<IRegionModuleBase>();
820
821 foreach (IRegionModuleBase module in scene.RegionModules.Values)
822 {
823 if (module.GetType().GetInterface("ISharedRegionModule") != null)
824 nonSharedModules.Add(module);
825 else
826 sharedModules.Add(module);
827 }
828
829 foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
830 MainConsole.Instance.OutputFormat("New Region Module (Shared): {0}", module.Name);
831
832 foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
833 MainConsole.Instance.OutputFormat("New Region Module (Non-Shared): {0}", module.Name);
856 } 834 }
857 }
858 ); 835 );
859 836
860 MainConsole.Instance.Output(""); 837 MainConsole.Instance.Output("");