2006-11-28 07:48:43 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using libsecondlife;
|
|
|
|
|
using libsecondlife.Packets;
|
|
|
|
|
|
|
|
|
|
namespace libsecondlife.TestClient
|
|
|
|
|
{
|
|
|
|
|
public class LoginCommand : Command
|
|
|
|
|
{
|
2006-12-21 08:53:08 +00:00
|
|
|
public LoginCommand(TestClient testClient)
|
2006-11-28 07:48:43 +00:00
|
|
|
{
|
|
|
|
|
Name = "login";
|
|
|
|
|
Description = "Logs in another avatar";
|
|
|
|
|
}
|
|
|
|
|
|
2006-12-21 08:53:08 +00:00
|
|
|
public override string Execute(string[] args, LLUUID fromAgentID)
|
2006-11-28 07:48:43 +00:00
|
|
|
{
|
|
|
|
|
if (args.Length != 3)
|
|
|
|
|
return "usage: login firstname lastname password";
|
|
|
|
|
|
2007-01-04 05:41:23 +00:00
|
|
|
SecondLife newClient = Client.ClientManager.Login(args);
|
2006-11-28 07:48:43 +00:00
|
|
|
|
|
|
|
|
if (newClient.Network.Connected)
|
|
|
|
|
{
|
|
|
|
|
return "Logged in " + newClient.ToString();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2006-12-16 09:07:28 +00:00
|
|
|
return "Failed to login: " +
|
2006-11-28 07:48:43 +00:00
|
|
|
newClient.Network.LoginError;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|