diff options
author | gareth | 2007-05-13 19:46:09 +0000 |
---|---|---|
committer | gareth | 2007-05-13 19:46:09 +0000 |
commit | 9ec87a847edc88339bb4f2fed1462a4dbc3992a6 (patch) | |
tree | 4778bd95b2efc8b6e090ac903721dbc084d7e217 | |
parent | Setting default grid server to DB4o (diff) | |
download | opensim-SC-9ec87a847edc88339bb4f2fed1462a4dbc3992a6.zip opensim-SC-9ec87a847edc88339bb4f2fed1462a4dbc3992a6.tar.gz opensim-SC-9ec87a847edc88339bb4f2fed1462a4dbc3992a6.tar.bz2 opensim-SC-9ec87a847edc88339bb4f2fed1462a4dbc3992a6.tar.xz |
bla
Diffstat (limited to '')
-rw-r--r-- | ExportBot/ClientManager.cs | 15 | ||||
-rw-r--r-- | ExportBot/Commands/CloneProfileCommand.cs | 6 | ||||
-rw-r--r-- | ExportBot/Commands/ExportOutfitCommand.cs | 14 |
3 files changed, 20 insertions, 15 deletions
diff --git a/ExportBot/ClientManager.cs b/ExportBot/ClientManager.cs index 65c01ee..79528ed 100644 --- a/ExportBot/ClientManager.cs +++ b/ExportBot/ClientManager.cs | |||
@@ -42,6 +42,8 @@ namespace libsecondlife.TestClient | |||
42 | 42 | ||
43 | public bool Running = true; | 43 | public bool Running = true; |
44 | 44 | ||
45 | public static SecondLife MainClient; | ||
46 | |||
45 | string contactPerson = String.Empty; | 47 | string contactPerson = String.Empty; |
46 | private LLUUID resolvedMasterKey = LLUUID.Zero; | 48 | private LLUUID resolvedMasterKey = LLUUID.Zero; |
47 | private ManualResetEvent keyResolution = new ManualResetEvent(false); | 49 | private ManualResetEvent keyResolution = new ManualResetEvent(false); |
@@ -71,14 +73,14 @@ namespace libsecondlife.TestClient | |||
71 | } | 73 | } |
72 | } | 74 | } |
73 | 75 | ||
74 | public string ExportAvatarRestMethod( string request, string path, string param ) | 76 | public string ExportAvatarRestMethod( string request, string path, string param ) |
75 | { | 77 | { |
76 | Console.WriteLine("Got a request to export an avatar!"); | 78 | Console.WriteLine("Got a request to export an avatar!"); |
77 | Console.WriteLine("Executing cloneprofile " + param); | 79 | DoCommandAll("Executing exportoutfitcommand " + param + " " + param + ".xml", null, null); |
78 | DoCommandAll("cloneprofile " + param, null, null); | ||
79 | DoCommandAll("say copied avatar, preparing to upload to remote server...", null, null); | ||
80 | return "OK"; | ||
81 | 80 | ||
81 | MainClient.Self.InstantMessage(new LLUUID(param), "(automated bot message) Your avatar has been copied OK, if you wish to use it to create your account please type yes, otherwise ignore this message. Note that you are responsible for obtaining all copyright permissions for textures etc on your avatar", new LLUUID(param)); | ||
82 | |||
83 | return "OK"; | ||
82 | } | 84 | } |
83 | 85 | ||
84 | 86 | ||
@@ -156,7 +158,8 @@ namespace libsecondlife.TestClient | |||
156 | 158 | ||
157 | Clients[client.Network.AgentID] = client; | 159 | Clients[client.Network.AgentID] = client; |
158 | 160 | ||
159 | Console.WriteLine("Logged in " + client.ToString()); | 161 | MainClient = client; |
162 | Console.WriteLine("Logged in " + client.ToString()); | ||
160 | } | 163 | } |
161 | 164 | ||
162 | return client; | 165 | return client; |
diff --git a/ExportBot/Commands/CloneProfileCommand.cs b/ExportBot/Commands/CloneProfileCommand.cs index d608318..68712ff 100644 --- a/ExportBot/Commands/CloneProfileCommand.cs +++ b/ExportBot/Commands/CloneProfileCommand.cs | |||
@@ -24,20 +24,20 @@ namespace libsecondlife.TestClient | |||
24 | testClient.Avatars.OnAvatarGroups += new AvatarManager.AvatarGroupsCallback(Avatars_OnAvatarGroups); | 24 | testClient.Avatars.OnAvatarGroups += new AvatarManager.AvatarGroupsCallback(Avatars_OnAvatarGroups); |
25 | testClient.Self.OnJoinGroup += new MainAvatar.JoinGroupCallback(Self_OnJoinGroup); | 25 | testClient.Self.OnJoinGroup += new MainAvatar.JoinGroupCallback(Self_OnJoinGroup); |
26 | 26 | ||
27 | testClient.Self.Objects.OnNewAvatar += new ObjectManager.NewAvatarCallback(AvatarSeen); | 27 | // testClient.Self.Objects.OnNewAvatar += new ObjectManager.NewAvatarCallback(AvatarSeen); |
28 | 28 | ||
29 | Name = "cloneprofile"; | 29 | Name = "cloneprofile"; |
30 | Description = "Clones another avatars profile as closely as possible. WARNING: This command will " + | 30 | Description = "Clones another avatars profile as closely as possible. WARNING: This command will " + |
31 | "destroy your existing profile! Usage: cloneprofile [targetuuid]"; | 31 | "destroy your existing profile! Usage: cloneprofile [targetuuid]"; |
32 | } | 32 | } |
33 | 33 | ||
34 | void AvatarSeen(Simulator simulator, Avatar avatar, ulong regionHandle, ushort timeDilation) | 34 | /* void AvatarSeen(Simulator simulator, Avatar avatar, ulong regionHandle, ushort timeDilation) |
35 | { | 35 | { |
36 | lock (Avatars) | 36 | lock (Avatars) |
37 | { | 37 | { |
38 | Avatars.Add(avatar.UUID,avatar.LocalID); | 38 | Avatars.Add(avatar.UUID,avatar.LocalID); |
39 | } | 39 | } |
40 | } | 40 | }*/ |
41 | 41 | ||
42 | public override string Execute(string[] args, LLUUID fromAgentID) | 42 | public override string Execute(string[] args, LLUUID fromAgentID) |
43 | { | 43 | { |
diff --git a/ExportBot/Commands/ExportOutfitCommand.cs b/ExportBot/Commands/ExportOutfitCommand.cs index 6ec2776..5945942 100644 --- a/ExportBot/Commands/ExportOutfitCommand.cs +++ b/ExportBot/Commands/ExportOutfitCommand.cs | |||
@@ -37,16 +37,18 @@ namespace libsecondlife.TestClient | |||
37 | { | 37 | { |
38 | try | 38 | try |
39 | { | 39 | { |
40 | XmlWriterSettings settings = new XmlWriterSettings(); | 40 | StreamWriter Outfile = File.AppendText(args[1]); |
41 | settings.Indent = true; | 41 | |
42 | XmlWriter writer = XmlWriter.Create(args[1], settings); | 42 | |
43 | try | 43 | try |
44 | { | 44 | { |
45 | Client.Appearances[id].ToXml(writer); | 45 | Outfile.Write(Client.Appearances[id].ToString()); |
46 | Console.WriteLine(Client.Appearances[id].ToString()); | ||
47 | //Client.Appearances[id].ToXml(writer); | ||
46 | } | 48 | } |
47 | finally | 49 | finally |
48 | { | 50 | { |
49 | writer.Close(); | 51 | Outfile.Close(); |
50 | } | 52 | } |
51 | } | 53 | } |
52 | catch (Exception e) | 54 | catch (Exception e) |
@@ -63,4 +65,4 @@ namespace libsecondlife.TestClient | |||
63 | } | 65 | } |
64 | } | 66 | } |
65 | } | 67 | } |
66 | } \ No newline at end of file | 68 | } |