aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ExportBot/Commands/ExportOutfitCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ExportBot/Commands/ExportOutfitCommand.cs')
-rw-r--r--ExportBot/Commands/ExportOutfitCommand.cs68
1 files changed, 0 insertions, 68 deletions
diff --git a/ExportBot/Commands/ExportOutfitCommand.cs b/ExportBot/Commands/ExportOutfitCommand.cs
deleted file mode 100644
index 5945942..0000000
--- a/ExportBot/Commands/ExportOutfitCommand.cs
+++ /dev/null
@@ -1,68 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.IO;
4using System.Xml;
5using libsecondlife;
6using libsecondlife.Packets;
7
8namespace libsecondlife.TestClient
9{
10 public class ExportOutfitCommand : Command
11 {
12 public ExportOutfitCommand(TestClient testClient)
13 {
14 Name = "exportoutfit";
15 Description = "Exports an avatars outfit to an xml file. Usage: exportoutfit avataruuid outputfile.xml";
16 }
17
18 public override string Execute(string[] args, LLUUID fromAgentID)
19 {
20 if (args.Length != 2)
21 return "Usage: exportoutfit avataruuid outputfile.xml";
22
23 LLUUID id;
24
25 try
26 {
27 id = new LLUUID(args[0]);
28 }
29 catch (Exception)
30 {
31 return "Usage: exportoutfit avataruuid outputfile.xml";
32 }
33
34 lock (Client.Appearances)
35 {
36 if (Client.Appearances.ContainsKey(id))
37 {
38 try
39 {
40 StreamWriter Outfile = File.AppendText(args[1]);
41
42
43 try
44 {
45 Outfile.Write(Client.Appearances[id].ToString());
46 Console.WriteLine(Client.Appearances[id].ToString());
47 //Client.Appearances[id].ToXml(writer);
48 }
49 finally
50 {
51 Outfile.Close();
52 }
53 }
54 catch (Exception e)
55 {
56 return e.ToString();
57 }
58
59 return "Exported appearance for avatar " + id.ToString() + " to " + args[1];
60 }
61 else
62 {
63 return "Couldn't find an appearance for avatar " + id.ToString();
64 }
65 }
66 }
67 }
68}