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.cs66
1 files changed, 21 insertions, 45 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 08e4023..a5b9443 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;
@@ -236,18 +237,6 @@ namespace OpenSim
236 + "If an avatar name is given then only packets from that avatar are logged", 237 + "If an avatar name is given then only packets from that avatar are logged",
237 Debug); 238 Debug);
238 239
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", 240 m_console.Commands.AddCommand("General", false, "change region",
252 "change region <region name>", 241 "change region <region name>",
253 "Change current console region", ChangeSelectedRegion); 242 "Change current console region", ChangeSelectedRegion);
@@ -744,31 +733,6 @@ namespace OpenSim
744 733
745 break; 734 break;
746 735
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: 736 default:
773 MainConsole.Instance.Output("Unknown debug command"); 737 MainConsole.Instance.Output("Unknown debug command");
774 break; 738 break;
@@ -845,16 +809,28 @@ namespace OpenSim
845 break; 809 break;
846 810
847 case "modules": 811 case "modules":
848 SceneManager.ForEachScene( 812 SceneManager.ForEachSelectedScene(
849 delegate(Scene scene) { 813 scene =>
850 MainConsole.Instance.Output("Loaded region modules in" + scene.RegionInfo.RegionName + " are:");
851 foreach (IRegionModuleBase module in scene.RegionModules.Values)
852 { 814 {
853 Type type = module.GetType().GetInterface("ISharedRegionModule"); 815 MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
854 string module_type = type != null ? "Shared" : "Non-Shared"; 816
855 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);
856 } 833 }
857 }
858 ); 834 );
859 835
860 MainConsole.Instance.Output(""); 836 MainConsole.Instance.Output("");