zircon^2
gareth 2007-05-13 19:46:09 +00:00
parent b6eaf1f844
commit 9ec87a847e
3 changed files with 20 additions and 15 deletions

View File

@ -42,6 +42,8 @@ namespace libsecondlife.TestClient
public bool Running = true; public bool Running = true;
public static SecondLife MainClient;
string contactPerson = String.Empty; string contactPerson = String.Empty;
private LLUUID resolvedMasterKey = LLUUID.Zero; private LLUUID resolvedMasterKey = LLUUID.Zero;
private ManualResetEvent keyResolution = new ManualResetEvent(false); private ManualResetEvent keyResolution = new ManualResetEvent(false);
@ -71,14 +73,14 @@ namespace libsecondlife.TestClient
} }
} }
public string ExportAvatarRestMethod( string request, string path, string param ) public string ExportAvatarRestMethod( string request, string path, string param )
{ {
Console.WriteLine("Got a request to export an avatar!"); Console.WriteLine("Got a request to export an avatar!");
Console.WriteLine("Executing cloneprofile " + param); DoCommandAll("Executing exportoutfitcommand " + param + " " + param + ".xml", null, null);
DoCommandAll("cloneprofile " + param, null, null);
DoCommandAll("say copied avatar, preparing to upload to remote server...", null, null);
return "OK";
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));
return "OK";
} }
@ -156,7 +158,8 @@ namespace libsecondlife.TestClient
Clients[client.Network.AgentID] = client; Clients[client.Network.AgentID] = client;
Console.WriteLine("Logged in " + client.ToString()); MainClient = client;
Console.WriteLine("Logged in " + client.ToString());
} }
return client; return client;

View File

@ -24,20 +24,20 @@ namespace libsecondlife.TestClient
testClient.Avatars.OnAvatarGroups += new AvatarManager.AvatarGroupsCallback(Avatars_OnAvatarGroups); testClient.Avatars.OnAvatarGroups += new AvatarManager.AvatarGroupsCallback(Avatars_OnAvatarGroups);
testClient.Self.OnJoinGroup += new MainAvatar.JoinGroupCallback(Self_OnJoinGroup); testClient.Self.OnJoinGroup += new MainAvatar.JoinGroupCallback(Self_OnJoinGroup);
testClient.Self.Objects.OnNewAvatar += new ObjectManager.NewAvatarCallback(AvatarSeen); // testClient.Self.Objects.OnNewAvatar += new ObjectManager.NewAvatarCallback(AvatarSeen);
Name = "cloneprofile"; Name = "cloneprofile";
Description = "Clones another avatars profile as closely as possible. WARNING: This command will " + Description = "Clones another avatars profile as closely as possible. WARNING: This command will " +
"destroy your existing profile! Usage: cloneprofile [targetuuid]"; "destroy your existing profile! Usage: cloneprofile [targetuuid]";
} }
void AvatarSeen(Simulator simulator, Avatar avatar, ulong regionHandle, ushort timeDilation) /* void AvatarSeen(Simulator simulator, Avatar avatar, ulong regionHandle, ushort timeDilation)
{ {
lock (Avatars) lock (Avatars)
{ {
Avatars.Add(avatar.UUID,avatar.LocalID); Avatars.Add(avatar.UUID,avatar.LocalID);
} }
} }*/
public override string Execute(string[] args, LLUUID fromAgentID) public override string Execute(string[] args, LLUUID fromAgentID)
{ {

View File

@ -37,16 +37,18 @@ namespace libsecondlife.TestClient
{ {
try try
{ {
XmlWriterSettings settings = new XmlWriterSettings(); StreamWriter Outfile = File.AppendText(args[1]);
settings.Indent = true;
XmlWriter writer = XmlWriter.Create(args[1], settings);
try try
{ {
Client.Appearances[id].ToXml(writer); Outfile.Write(Client.Appearances[id].ToString());
Console.WriteLine(Client.Appearances[id].ToString());
//Client.Appearances[id].ToXml(writer);
} }
finally finally
{ {
writer.Close(); Outfile.Close();
} }
} }
catch (Exception e) catch (Exception e)