Better output for show neighbours

0.7.1-dev
Diva Canto 2011-02-06 07:51:20 -08:00
parent 3411d4867d
commit 2c7e87c45b
1 changed files with 6 additions and 2 deletions

View File

@ -247,13 +247,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
public void NeighboursCommand(string module, string[] cmdparams) public void NeighboursCommand(string module, string[] cmdparams)
{ {
System.Text.StringBuilder caps = new System.Text.StringBuilder();
foreach (KeyValuePair<UUID, RegionCache> kvp in m_LocalCache) foreach (KeyValuePair<UUID, RegionCache> kvp in m_LocalCache)
{ {
m_log.InfoFormat("*** Neighbours of {0} {1} ***", kvp.Key, kvp.Value.RegionName); caps.AppendFormat("*** Neighbours of {0} ({1}) ***\n", kvp.Value.RegionName, kvp.Key);
List<GridRegion> regions = kvp.Value.GetNeighbours(); List<GridRegion> regions = kvp.Value.GetNeighbours();
foreach (GridRegion r in regions) foreach (GridRegion r in regions)
m_log.InfoFormat(" {0} @ {1}={2}", r.RegionName, r.RegionLocX / Constants.RegionSize, r.RegionLocY / Constants.RegionSize); caps.AppendFormat(" {0} @ {1}-{2}\n", r.RegionName, r.RegionLocX / Constants.RegionSize, r.RegionLocY / Constants.RegionSize);
} }
MainConsole.Instance.Output(caps.ToString());
} }
} }