From 5b6afeafbc249ba88dcc20d1fbc98ce12418b21b Mon Sep 17 00:00:00 2001 From: gareth Date: Tue, 8 May 2007 00:10:04 +0000 Subject: Brought in TestClient code for teh fork --- ExportBot/Commands/WhoCommand.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ExportBot/Commands/WhoCommand.cs (limited to 'ExportBot/Commands/WhoCommand.cs') diff --git a/ExportBot/Commands/WhoCommand.cs b/ExportBot/Commands/WhoCommand.cs new file mode 100644 index 0000000..83d8610 --- /dev/null +++ b/ExportBot/Commands/WhoCommand.cs @@ -0,0 +1,29 @@ +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(); + foreach (Avatar av in Client.AvatarList.Values) + { + result.AppendFormat("\n{0} {1} {2}/{3} ID: {4}", av.Name, av.GroupName, + (av.CurrentSim != null ? av.CurrentSim.Name : String.Empty), av.Position, av.ID); + } + + return result.ToString(); + } + } +} -- cgit v1.1