aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-03-05 01:23:16 +0000
committerJustin Clark-Casey (justincc)2014-03-05 01:23:48 +0000
commit4e6f7435d0ab2b1d8ce5c723a0be33b88d05e571 (patch)
tree8714a267f709a1f34c6157f017617d30dad94e50 /OpenSim
parentDon't request a terse update after local teleport - this will be done by the ... (diff)
downloadopensim-SC_OLD-4e6f7435d0ab2b1d8ce5c723a0be33b88d05e571.zip
opensim-SC_OLD-4e6f7435d0ab2b1d8ce5c723a0be33b88d05e571.tar.gz
opensim-SC_OLD-4e6f7435d0ab2b1d8ce5c723a0be33b88d05e571.tar.bz2
opensim-SC_OLD-4e6f7435d0ab2b1d8ce5c723a0be33b88d05e571.tar.xz
Add UUID and ready status (whether region has finished starting up) to "show regions" console output.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Console/ConsoleDisplayUtil.cs43
-rw-r--r--OpenSim/Region/Application/OpenSim.cs27
2 files changed, 60 insertions, 10 deletions
diff --git a/OpenSim/Framework/Console/ConsoleDisplayUtil.cs b/OpenSim/Framework/Console/ConsoleDisplayUtil.cs
new file mode 100644
index 0000000..b65fd75
--- /dev/null
+++ b/OpenSim/Framework/Console/ConsoleDisplayUtil.cs
@@ -0,0 +1,43 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29
30namespace OpenSim.Framework.Console
31{
32 /// <summary>
33 /// This will be a set of typical column sizes to allow greater consistency between console commands.
34 /// </summary>
35 public static class ConsoleDisplayUtil
36 {
37 public const int CoordTupleSize = 11;
38 public const int EstateNameSize = 20;
39 public const int PortSize = 5;
40 public const int RegionNameSize = 20;
41 public const int UuidSize = 36;
42 }
43} \ No newline at end of file
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 3d80c6e..6d3331b 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -916,17 +916,24 @@ namespace OpenSim
916 break; 916 break;
917 917
918 case "regions": 918 case "regions":
919 ConsoleDisplayTable cdt = new ConsoleDisplayTable();
920 cdt.AddColumn("Name", ConsoleDisplayUtil.RegionNameSize);
921 cdt.AddColumn("ID", ConsoleDisplayUtil.UuidSize);
922 cdt.AddColumn("Position", ConsoleDisplayUtil.CoordTupleSize);
923 cdt.AddColumn("Port", ConsoleDisplayUtil.PortSize);
924 cdt.AddColumn("Ready?", 6);
925 cdt.AddColumn("Estate", ConsoleDisplayUtil.EstateNameSize);
919 SceneManager.ForEachScene( 926 SceneManager.ForEachScene(
920 delegate(Scene scene) 927 scene =>
921 { 928 {
922 MainConsole.Instance.Output(String.Format( 929 RegionInfo ri = scene.RegionInfo;
923 "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}, Estate Name: {4}", 930 cdt.AddRow(
924 scene.RegionInfo.RegionName, 931 ri.RegionName, ri.RegionID, string.Format("{0},{1}", ri.RegionLocX, ri.RegionLocY),
925 scene.RegionInfo.RegionLocX, 932 ri.InternalEndPoint.Port, scene.Ready ? "Yes" : "No", ri.EstateSettings.EstateName);
926 scene.RegionInfo.RegionLocY, 933 }
927 scene.RegionInfo.InternalEndPoint.Port, 934 );
928 scene.RegionInfo.EstateSettings.EstateName)); 935
929 }); 936 MainConsole.Instance.Output(cdt.ToString());
930 break; 937 break;
931 938
932 case "ratings": 939 case "ratings":