2025-05-27 14:16:03 -05:00
|
|
|
using System.Linq;
|
2007-04-28 20:54:02 +00:00
|
|
|
using System.Text;
|
|
|
|
|
|
2008-07-21 21:12:59 +00:00
|
|
|
namespace OpenMetaverse.TestClient
|
2007-04-28 20:54:02 +00:00
|
|
|
{
|
|
|
|
|
public class WhoCommand: Command
|
|
|
|
|
{
|
|
|
|
|
public WhoCommand(TestClient testClient)
|
|
|
|
|
{
|
|
|
|
|
Name = "who";
|
|
|
|
|
Description = "Lists seen avatars.";
|
2008-07-25 08:55:36 +00:00
|
|
|
Category = CommandCategory.Other;
|
2007-04-28 20:54:02 +00:00
|
|
|
}
|
|
|
|
|
|
2008-07-25 05:15:05 +00:00
|
|
|
public override string Execute(string[] args, UUID fromAgentID)
|
2007-04-28 20:54:02 +00:00
|
|
|
{
|
|
|
|
|
StringBuilder result = new StringBuilder();
|
2007-08-20 09:26:21 +00:00
|
|
|
|
|
|
|
|
lock (Client.Network.Simulators)
|
|
|
|
|
{
|
2025-05-27 14:16:03 -05:00
|
|
|
foreach (var av in from sim in Client.Network.Simulators
|
|
|
|
|
from kvp in sim.ObjectsAvatars where kvp.Value != null select kvp.Value)
|
2007-08-20 09:26:21 +00:00
|
|
|
{
|
2025-05-27 14:16:03 -05:00
|
|
|
result.AppendLine();
|
|
|
|
|
result.AppendFormat("{0} (Group: {1}, Location: {2}, UUID: {3} LocalID: {4})",
|
|
|
|
|
av.Name, av.GroupName, av.Position, av.ID, av.LocalID);
|
2007-08-20 09:26:21 +00:00
|
|
|
}
|
|
|
|
|
}
|
2007-04-28 20:54:02 +00:00
|
|
|
|
|
|
|
|
return result.ToString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|