2006-12-23 02:55:54 +00:00
|
|
|
using System;
|
|
|
|
|
using libsecondlife;
|
|
|
|
|
using libsecondlife.Utilities;
|
|
|
|
|
|
|
|
|
|
namespace Key2Name
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
if (args.Length < 4)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Usage: Key2Name [loginfirstname] [loginlastname] [password] [key]");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2007-02-06 18:21:34 +00:00
|
|
|
|
|
|
|
|
SecondLife client = new SecondLife();
|
2006-12-23 02:55:54 +00:00
|
|
|
Console.WriteLine("Attempting to connect and login to Second Life.");
|
|
|
|
|
|
2007-02-06 18:21:34 +00:00
|
|
|
// Login to Second Life
|
|
|
|
|
if (!client.Network.Login(args[0], args[1], args[2], "key2name", "jessemalthus@gmail.com"))
|
2006-12-23 02:55:54 +00:00
|
|
|
{
|
|
|
|
|
// Login failed
|
2007-04-02 04:37:15 +00:00
|
|
|
Console.WriteLine("Error logging in: " + client.Network.LoginMessage);
|
2006-12-23 02:55:54 +00:00
|
|
|
return;
|
|
|
|
|
}
|
2007-02-06 18:21:34 +00:00
|
|
|
|
2006-12-23 02:55:54 +00:00
|
|
|
AvatarTracker avatarTracker = new AvatarTracker(client);
|
2007-02-06 18:21:34 +00:00
|
|
|
|
|
|
|
|
LLUUID lookup = new LLUUID();
|
|
|
|
|
LLUUID.TryParse(args[3], out lookup);
|
|
|
|
|
|
2006-12-23 02:55:54 +00:00
|
|
|
Console.WriteLine("Looking up name for " + lookup.ToStringHyphenated());
|
2007-02-06 18:21:34 +00:00
|
|
|
|
2006-12-23 02:55:54 +00:00
|
|
|
string name = avatarTracker.GetAvatarName(lookup);
|
2007-02-06 18:21:34 +00:00
|
|
|
|
|
|
|
|
Console.WriteLine("Name: " + name + Environment.NewLine + "Press enter to logout.");
|
2006-12-23 02:55:54 +00:00
|
|
|
Console.ReadLine();
|
2007-02-06 18:21:34 +00:00
|
|
|
|
2006-12-23 02:55:54 +00:00
|
|
|
client.Network.Logout();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|