Skip IClientAPIs that don't implement IStatsCollector (such as NPCAvatar) from the "show queues" console report to stop screwing up formatting.

"show pquques" already did this
0.7.6-extended
Justin Clark-Casey (justincc) 2014-01-24 19:31:31 +00:00
parent 87e725cd24
commit d1f1642e1a
1 changed files with 15 additions and 15 deletions

View File

@ -434,6 +434,9 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
scene.ForEachClient( scene.ForEachClient(
delegate(IClientAPI client) delegate(IClientAPI client)
{ {
if (client is IStatsCollector)
{
bool isChild = client.SceneAgent.IsChildAgent; bool isChild = client.SceneAgent.IsChildAgent;
if (isChild && !showChildren) if (isChild && !showChildren)
return; return;
@ -448,10 +451,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding));
report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding));
if (client is IStatsCollector)
{
IStatsCollector stats = (IStatsCollector)client; IStatsCollector stats = (IStatsCollector)client;
report.AppendLine(stats.Report()); report.AppendLine(stats.Report());
} }
}); });