Files
libremetaverse/Programs/examples/TestClient/Commands/WhoCommand.cs
Jim Radford de8c3131a1 LIBOMV-492 WinGridProxy - Automatically colorize packet details in view
* Log Viewer built into WinGridProxy
* New Decoder system supports the ability to do custom decoding on packet fields, PacketToString moved from Helpers to its own class.
* GridProxy library now uses log4net library to do logging, WinGridProxy logging configuration added to make use of this.
LIBOMV-512 WinGridProxy decodes KeyValue pairs

* Added Invert & Mirror flags to sculptType enum
* Converted SoundManager to use the SoundFlags enum in the AttachedSound callback
* TestClient "who" command now shows agents logal ID

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2805 52acb1d6-8a22-11de-b505-999d5b087335
2009-05-25 19:00:28 +00:00

41 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
using OpenMetaverse.Packets;
namespace OpenMetaverse.TestClient
{
public class WhoCommand: Command
{
public WhoCommand(TestClient testClient)
{
Name = "who";
Description = "Lists seen avatars.";
Category = CommandCategory.Other;
}
public override string Execute(string[] args, UUID fromAgentID)
{
StringBuilder result = new StringBuilder();
lock (Client.Network.Simulators)
{
for (int i = 0; i < Client.Network.Simulators.Count; i++)
{
Client.Network.Simulators[i].ObjectsAvatars.ForEach(
delegate(Avatar av)
{
result.AppendLine();
result.AppendFormat("{0} (Group: {1}, Location: {2}, UUID: {3} LocalID: {4})",
av.Name, av.GroupName, av.Position, av.ID, av.LocalID);
}
);
}
}
return result.ToString();
}
}
}