corrade-vassal – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using OpenMetaverse;
5 using OpenMetaverse.Packets;
6  
7 namespace OpenMetaverse.TestClient
8 {
9 public class WhoCommand: Command
10 {
11 public WhoCommand(TestClient testClient)
12 {
13 Name = "who";
14 Description = "Lists seen avatars.";
15 Category = CommandCategory.Other;
16 }
17  
18 public override string Execute(string[] args, UUID fromAgentID)
19 {
20 StringBuilder result = new StringBuilder();
21  
22 lock (Client.Network.Simulators)
23 {
24 for (int i = 0; i < Client.Network.Simulators.Count; i++)
25 {
26 Client.Network.Simulators[i].ObjectsAvatars.ForEach(
27 delegate(Avatar av)
28 {
29 result.AppendLine();
30 result.AppendFormat("{0} (Group: {1}, Location: {2}, UUID: {3} LocalID: {4})",
31 av.Name, av.GroupName, av.Position, av.ID, av.LocalID);
32 }
33 );
34 }
35 }
36  
37 return result.ToString();
38 }
39 }
40 }