diff options
author | gareth | 2007-05-14 03:13:47 +0000 |
---|---|---|
committer | gareth | 2007-05-14 03:13:47 +0000 |
commit | 64a98c736848de6099254f23483058668273c1a5 (patch) | |
tree | a8f2624277e48814531750db0ec07a8d64c1f740 /ExportBot/Commands/ExportOutfitCommand.cs | |
parent | Added skeleton for grid management agent (diff) | |
download | opensim-SC-64a98c736848de6099254f23483058668273c1a5.zip opensim-SC-64a98c736848de6099254f23483058668273c1a5.tar.gz opensim-SC-64a98c736848de6099254f23483058668273c1a5.tar.bz2 opensim-SC-64a98c736848de6099254f23483058668273c1a5.tar.xz |
Finished off adding the new management API to gridserver
Updated VersionInfo.cs finally
Updated prebuild and rebuilt nant build files
Completed Management agent basics
Diffstat (limited to 'ExportBot/Commands/ExportOutfitCommand.cs')
-rw-r--r-- | ExportBot/Commands/ExportOutfitCommand.cs | 68 |
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 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.IO; | ||
4 | using System.Xml; | ||
5 | using libsecondlife; | ||
6 | using libsecondlife.Packets; | ||
7 | |||
8 | namespace 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 | } | ||