From f91ec192247d64786b3eeab66512fdf319273d68 Mon Sep 17 00:00:00 2001 From: Marck Date: Sat, 31 Jul 2010 20:16:39 +0200 Subject: Implemented console command "show hyperlinks". --- OpenSim/Services/GridService/HypergridLinker.cs | 49 ++++++++++++------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'OpenSim/Services/GridService/HypergridLinker.cs') diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index ae80a8c..23f0004 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -378,32 +378,31 @@ namespace OpenSim.Services.GridService public void HandleShow(string module, string[] cmd) { - MainConsole.Instance.Output("Not Implemented Yet"); - //if (cmd.Length != 2) - //{ - // MainConsole.Instance.Output("Syntax: show hyperlinks"); - // return; - //} - //List regions = new List(m_HypergridService.m_HyperlinkRegions.Values); - //if (regions == null || regions.Count < 1) - //{ - // MainConsole.Instance.Output("No hyperlinks"); - // return; - //} - - //MainConsole.Instance.Output("Region Name Region UUID"); - //MainConsole.Instance.Output("Location URI"); - //MainConsole.Instance.Output("Owner ID "); - //MainConsole.Instance.Output("-------------------------------------------------------------------------------"); - //foreach (GridRegion r in regions) - //{ - // MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} \n\n", - // r.RegionName, r.RegionID, - // String.Format("{0},{1}", r.RegionLocX, r.RegionLocY), "http://" + r.ExternalHostName + ":" + r.HttpPort.ToString(), - // r.EstateOwner.ToString())); - //} - //return; + if (cmd.Length != 2) + { + MainConsole.Instance.Output("Syntax: show hyperlinks"); + return; + } + List regions = m_Database.GetHyperlinks(UUID.Zero); + if (regions == null || regions.Count < 1) + { + MainConsole.Instance.Output("No hyperlinks"); + return; + } + + MainConsole.Instance.Output("Region Name Region UUID"); + MainConsole.Instance.Output("Location URI"); + MainConsole.Instance.Output("-------------------------------------------------------------------------------"); + foreach (RegionData r in regions) + { + MainConsole.Instance.Output(String.Format("{0,-39} {1}\n{2,-39} {3}\n", + r.RegionName, r.RegionID, + String.Format("{0},{1} ({2},{3})", r.posX, r.posY, r.posX / 256, r.posY / 256), + "http://" + r.Data["serverIP"].ToString() + ":" + r.Data["serverHttpPort"].ToString())); + } + return; } + public void RunCommand(string module, string[] cmdparams) { List args = new List(cmdparams); -- cgit v1.1 From c4ecbd1fb1ce5450b66a7de41a0e34cc3474e04a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 31 Jul 2010 16:40:58 -0700 Subject: White space from previous commit. --- OpenSim/Services/GridService/HypergridLinker.cs | 42 ++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'OpenSim/Services/GridService/HypergridLinker.cs') diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 23f0004..1f53007 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs @@ -378,28 +378,28 @@ namespace OpenSim.Services.GridService public void HandleShow(string module, string[] cmd) { - if (cmd.Length != 2) - { - MainConsole.Instance.Output("Syntax: show hyperlinks"); - return; + if (cmd.Length != 2) + { + MainConsole.Instance.Output("Syntax: show hyperlinks"); + return; + } + List regions = m_Database.GetHyperlinks(UUID.Zero); + if (regions == null || regions.Count < 1) + { + MainConsole.Instance.Output("No hyperlinks"); + return; + } + + MainConsole.Instance.Output("Region Name Region UUID"); + MainConsole.Instance.Output("Location URI"); + MainConsole.Instance.Output("-------------------------------------------------------------------------------"); + foreach (RegionData r in regions) + { + MainConsole.Instance.Output(String.Format("{0,-39} {1}\n{2,-39} {3}\n", + r.RegionName, r.RegionID, + String.Format("{0},{1} ({2},{3})", r.posX, r.posY, r.posX / 256, r.posY / 256), + "http://" + r.Data["serverIP"].ToString() + ":" + r.Data["serverHttpPort"].ToString())); } - List regions = m_Database.GetHyperlinks(UUID.Zero); - if (regions == null || regions.Count < 1) - { - MainConsole.Instance.Output("No hyperlinks"); - return; - } - - MainConsole.Instance.Output("Region Name Region UUID"); - MainConsole.Instance.Output("Location URI"); - MainConsole.Instance.Output("-------------------------------------------------------------------------------"); - foreach (RegionData r in regions) - { - MainConsole.Instance.Output(String.Format("{0,-39} {1}\n{2,-39} {3}\n", - r.RegionName, r.RegionID, - String.Format("{0},{1} ({2},{3})", r.posX, r.posY, r.posX / 256, r.posY / 256), - "http://" + r.Data["serverIP"].ToString() + ":" + r.Data["serverHttpPort"].ToString())); - } return; } -- cgit v1.1