diff options
Diffstat (limited to 'ExportBot/Commands/Inventory/InventoryCommand.cs')
-rw-r--r-- | ExportBot/Commands/Inventory/InventoryCommand.cs | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/ExportBot/Commands/Inventory/InventoryCommand.cs b/ExportBot/Commands/Inventory/InventoryCommand.cs new file mode 100644 index 0000000..7b01bb1 --- /dev/null +++ b/ExportBot/Commands/Inventory/InventoryCommand.cs | |||
@@ -0,0 +1,62 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.IO; | ||
4 | using System.Text; | ||
5 | using System.Threading; | ||
6 | using System.Xml; | ||
7 | using System.Xml.Serialization; | ||
8 | |||
9 | using libsecondlife; | ||
10 | using libsecondlife.Packets; | ||
11 | using libsecondlife.InventorySystem; | ||
12 | |||
13 | namespace libsecondlife.TestClient | ||
14 | { | ||
15 | public class InventoryCommand : Command | ||
16 | { | ||
17 | public InventoryCommand(TestClient testClient) | ||
18 | { | ||
19 | Name = "i"; | ||
20 | Description = "Prints out inventory."; | ||
21 | } | ||
22 | |||
23 | public override string Execute(string[] args, LLUUID fromAgentID) | ||
24 | { | ||
25 | return "Broken until someone fixes me"; | ||
26 | |||
27 | //Client.Inventory.DownloadInventory(); | ||
28 | //StringBuilder result = new StringBuilder(); | ||
29 | //PrintFolder(Client.Inventory.GetRootFolder(), result, 0); | ||
30 | //return result.ToString(); | ||
31 | } | ||
32 | |||
33 | //void PrintFolder(InventoryFolder folder, StringBuilder output, int indenting) | ||
34 | //{ | ||
35 | // Indent(output, indenting); | ||
36 | // output.Append(folder.Name); | ||
37 | // output.Append("\n"); | ||
38 | // foreach (InventoryBase b in folder.GetContents()) | ||
39 | // { | ||
40 | // InventoryItem item = b as InventoryItem; | ||
41 | // if (item != null) | ||
42 | // { | ||
43 | // Indent(output, indenting + 1); | ||
44 | // output.Append(item.Name); | ||
45 | // output.Append("\n"); | ||
46 | // continue; | ||
47 | // } | ||
48 | // InventoryFolder subFolder = b as InventoryFolder; | ||
49 | // if (subFolder != null) | ||
50 | // PrintFolder(subFolder, output, indenting + 1); | ||
51 | // } | ||
52 | //} | ||
53 | |||
54 | //void Indent(StringBuilder output, int indenting) | ||
55 | //{ | ||
56 | // for (int count = 0; count < indenting; count++) | ||
57 | // { | ||
58 | // output.Append(" "); | ||
59 | // } | ||
60 | //} | ||
61 | } | ||
62 | } \ No newline at end of file | ||