From 1bdf0bed9cfb9ff1426706f0a65213f54554b0e6 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 18 Jul 2014 23:52:49 +0100 Subject: [PATCH] Add "show region" command which will show parameters for current region. This shows static data (e.g. region agent limit) whereas "show scene" shows live data (sim fps, current prims, etc.) --- .../World/Region/RegionCommandsModule.cs | 74 ++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs index 7d3547322f..11af2f3bc6 100644 --- a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs @@ -81,7 +81,13 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands m_console.Commands.AddCommand( "Regions", false, "show scene", "show scene", - "Show live scene information for the currently selected region.", HandleShowScene); + "Show live information for the currently selected scene (fps, prims, etc.).", HandleShowScene); + + m_console.Commands.AddCommand( + "Regions", false, "show region", + "show scene", + "Show control information for the currently selected region (host name, max physical prim size, etc).", + HandleShowRegion); } public void RemoveRegion(Scene scene) @@ -94,6 +100,72 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands // m_log.DebugFormat("[REGION COMMANDS MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); } + private void HandleShowRegion(string module, string[] cmd) + { + if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene)) + return; + + RegionInfo ri = m_scene.RegionInfo; + RegionSettings rs = ri.RegionSettings; + + StringBuilder sb = new StringBuilder(); + sb.AppendFormat("Region information for {0}\n", m_scene.Name); + + ConsoleDisplayList dispList = new ConsoleDisplayList(); + dispList.AddRow("Region ID", ri.RegionID); + dispList.AddRow("Region handle", ri.RegionHandle); + dispList.AddRow("Region location", string.Format("{0},{1}", ri.RegionLocX, ri.RegionLocY)); + dispList.AddRow("Region size", string.Format("{0}x{1}", ri.RegionSizeX, ri.RegionSizeY)); + //dispList.AddRow("Region type", ri.RegionType); + dispList.AddRow("Maturity", rs.Maturity); + dispList.AddRow("Region address", ri.ServerURI); + dispList.AddRow("From region file", ri.RegionFile); + dispList.AddRow("External endpoint", ri.ExternalEndPoint); + dispList.AddRow("Internal endpoint", ri.InternalEndPoint); + dispList.AddRow("Access level", ri.AccessLevel); + dispList.AddRow("Max agent limit", ri.AgentCapacity); + dispList.AddRow("Current agent limit", rs.AgentLimit); + dispList.AddRow("Linkset capacity", ri.LinksetCapacity <= 0 ? "not set" : ri.LinksetCapacity.ToString()); + dispList.AddRow("Prim capacity", ri.ObjectCapacity); + dispList.AddRow("Prim bonus", rs.ObjectBonus); + dispList.AddRow("Max prims per user", ri.MaxPrimsPerUser < 0 ? "n/a" : ri.MaxPrimsPerUser.ToString()); + dispList.AddRow("Clamp prim size", ri.ClampPrimSize); + dispList.AddRow("Non physical prim min size", ri.NonphysPrimMin <= 0 ? "not set" : string.Format("{0} m", ri.NonphysPrimMin)); + dispList.AddRow("Non physical prim max size", ri.NonphysPrimMax <= 0 ? "not set" : string.Format("{0} m", ri.NonphysPrimMax)); + dispList.AddRow("Physical prim min size", ri.PhysPrimMin <= 0 ? "not set" : string.Format("{0} m", ri.PhysPrimMin)); + dispList.AddRow("Physical prim max size", ri.PhysPrimMax <= 0 ? "not set" : string.Format("{0} m", ri.PhysPrimMax)); + + dispList.AddRow("Allow Damage", rs.AllowDamage); + dispList.AddRow("Allow Land join/divide", rs.AllowLandJoinDivide); + dispList.AddRow("Allow land resell", rs.AllowLandResell); + dispList.AddRow("Block fly", rs.BlockFly); + dispList.AddRow("Block show in search", rs.BlockShowInSearch); + dispList.AddRow("Block terraform", rs.BlockTerraform); + dispList.AddRow("Covenant UUID", rs.Covenant); + dispList.AddRow("Convenant change Unix time", rs.CovenantChangedDateTime); + dispList.AddRow("Disable collisions", rs.DisableCollisions); + dispList.AddRow("Disable physics", rs.DisablePhysics); + dispList.AddRow("Disable scripts", rs.DisableScripts); + dispList.AddRow("Restrict pushing", rs.RestrictPushing); + dispList.AddRow("Fixed sun", rs.FixedSun); + dispList.AddRow("Sun position", rs.SunPosition); + dispList.AddRow("Sun vector", rs.SunVector); + dispList.AddRow("Use estate sun", rs.UseEstateSun); + dispList.AddRow("Telehub UUID", rs.TelehubObject); + dispList.AddRow("Terrain lower limit", string.Format("{0} m", rs.TerrainLowerLimit)); + dispList.AddRow("Terrain raise limit", string.Format("{0} m", rs.TerrainRaiseLimit)); + dispList.AddRow("Water height", rs.WaterHeight); + + dispList.AddRow("Maptile static file", ri.MaptileStaticFile); + dispList.AddRow("Maptile static UUID", ri.MaptileStaticUUID); + dispList.AddRow("Last map refresh", ri.lastMapRefresh); + dispList.AddRow("Last map UUID", ri.lastMapUUID); + + dispList.AddToStringBuilder(sb); + + MainConsole.Instance.Output(sb.ToString()); + } + private void HandleShowScene(string module, string[] cmd) { if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))