* Added per-sim avatar and prim tracking through Simulator.Objects, use Settings.ALWAYS_DECODE_OBJECTS = true to enable * Handle DisconnectSim packet and don't send CloseCircuit packets on sim-triggered disconnects * Interpolation timer now does angular velocity and linear movement interpolation for all objects in the object tracker(s) git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1363 52acb1d6-8a22-11de-b505-999d5b087335
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using libsecondlife;
|
|
using libsecondlife.Packets;
|
|
|
|
namespace libsecondlife.TestClient
|
|
{
|
|
public class WhoCommand: Command
|
|
{
|
|
public WhoCommand(TestClient testClient)
|
|
{
|
|
Name = "who";
|
|
Description = "Lists seen avatars.";
|
|
}
|
|
|
|
public override string Execute(string[] args, LLUUID fromAgentID)
|
|
{
|
|
StringBuilder result = new StringBuilder();
|
|
|
|
lock (Client.Network.Simulators)
|
|
{
|
|
for (int i = 0; i < Client.Network.Simulators.Count; i++)
|
|
{
|
|
lock (Client.Network.Simulators[i].Objects.Avatars)
|
|
{
|
|
foreach (Avatar av in Client.Network.Simulators[i].Objects.Avatars.Values)
|
|
{
|
|
result.AppendLine();
|
|
result.AppendFormat("{0} (Group: {1}, Location: {2}/{3}, UUID: {4})", av.Name,
|
|
av.GroupName, (av.CurrentSim != null ? av.CurrentSim.Name : String.Empty),
|
|
av.Position, av.ID.ToStringHyphenated());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return result.ToString();
|
|
}
|
|
}
|
|
}
|