From 8a3754d552c457ebd8f036edb02ed85df44bc042 Mon Sep 17 00:00:00 2001 From: jef Date: Wed, 5 Dec 2007 20:23:46 +0000 Subject: [PATCH] <3 donovan nascent suport for the new login system. still needs to actually poll /inworld/go.php to get the web key automagically. git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1516 52acb1d6-8a22-11de-b505-999d5b087335 --- libsecondlife.xcodeproj/project.pbxproj | 2 +- libsecondlife/Login.cs | 6 ++++++ libsecondlife/examples/TestClient/ClientManager.cs | 2 ++ libsecondlife/examples/TestClient/Program.cs | 10 ++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/libsecondlife.xcodeproj/project.pbxproj b/libsecondlife.xcodeproj/project.pbxproj index c5c04a15..0ebaacbe 100644 --- a/libsecondlife.xcodeproj/project.pbxproj +++ b/libsecondlife.xcodeproj/project.pbxproj @@ -293,7 +293,7 @@ 4041F30F0BED7D550084F948 /* Analyst.cs */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.csharp; name = Analyst.cs; path = SLProxy/Analyst.cs; sourceTree = ""; }; 4041F3130BED7D640084F948 /* slproxy.exe */ = {isa = PBXFileReference; explicitFileType = compiled.mono.executable; includeInIndex = 0; path = slproxy.exe; sourceTree = BUILT_PRODUCTS_DIR; }; 4041F3E50BED8C0C0084F948 /* IA_LandmarkTool.exe */ = {isa = PBXFileReference; explicitFileType = compiled.mono.executable; includeInIndex = 0; path = IA_LandmarkTool.exe; sourceTree = BUILT_PRODUCTS_DIR; }; - 4054E3050B57345B00B0667D /* libsecondlife.dll */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = compiled.mono.library; path = libsecondlife.dll; sourceTree = BUILT_PRODUCTS_DIR; }; + 4054E3050B57345B00B0667D /* libsecondlife.dll */ = {isa = PBXFileReference; explicitFileType = compiled.mono.library; includeInIndex = 0; path = libsecondlife.dll; sourceTree = BUILT_PRODUCTS_DIR; }; 4054E36F0B57375B00B0667D /* libsecondlife.Utilities.dll */ = {isa = PBXFileReference; explicitFileType = compiled.mono.library; includeInIndex = 0; path = libsecondlife.Utilities.dll; sourceTree = BUILT_PRODUCTS_DIR; }; 4054E3830B57394E00B0667D /* name2key.exe */ = {isa = PBXFileReference; explicitFileType = compiled.mono.executable; includeInIndex = 0; path = name2key.exe; sourceTree = BUILT_PRODUCTS_DIR; }; 4054E3980B573A0900B0667D /* Key2Name.exe */ = {isa = PBXFileReference; explicitFileType = compiled.mono.executable; includeInIndex = 0; path = Key2Name.exe; sourceTree = BUILT_PRODUCTS_DIR; }; diff --git a/libsecondlife/Login.cs b/libsecondlife/Login.cs index 11d242ac..87a41ae7 100644 --- a/libsecondlife/Login.cs +++ b/libsecondlife/Login.cs @@ -101,6 +101,8 @@ namespace libsecondlife /// public string Password; /// + public string WebLoginKey; + /// public string Start; /// public string Channel; @@ -447,6 +449,8 @@ namespace libsecondlife CurrentContext.Params.MAC = String.Empty; if (CurrentContext.Params.Channel == null) CurrentContext.Params.Channel = String.Empty; + if (CurrentContext.Params.Password == null) + CurrentContext.Params.Password = String.Empty; // Convert the password to MD5 if it isn't already if (CurrentContext.Params.Password.Length != 35 && !CurrentContext.Params.Password.StartsWith("$1$")) @@ -465,6 +469,7 @@ namespace libsecondlife loginParams.first = CurrentContext.Params.FirstName; loginParams.last = CurrentContext.Params.LastName; loginParams.passwd = CurrentContext.Params.Password; + loginParams.web_login_key = CurrentContext.Params.WebLoginKey; loginParams.start = CurrentContext.Params.Start; loginParams.channel = CurrentContext.Params.Channel; loginParams.version = CurrentContext.Params.Version; @@ -788,6 +793,7 @@ namespace libsecondlife public string first; public string last; public string passwd; + public string web_login_key; public string start; public string channel; public string version; diff --git a/libsecondlife/examples/TestClient/ClientManager.cs b/libsecondlife/examples/TestClient/ClientManager.cs index 07cea828..f0762deb 100644 --- a/libsecondlife/examples/TestClient/ClientManager.cs +++ b/libsecondlife/examples/TestClient/ClientManager.cs @@ -13,6 +13,7 @@ namespace libsecondlife.TestClient public string FirstName; public string LastName; public string Password; + public string WebLoginKey; public string StartLocation; public string MasterName; public LLUUID MasterKey; @@ -100,6 +101,7 @@ namespace libsecondlife.TestClient NetworkManager.LoginParams loginParams = client.Network.DefaultLoginParams( account.FirstName, account.LastName, account.Password, "TestClient", contactPerson); + loginParams.WebLoginKey = account.WebLoginKey; if (!String.IsNullOrEmpty(account.StartLocation)) loginParams.Start = account.StartLocation; diff --git a/libsecondlife/examples/TestClient/Program.cs b/libsecondlife/examples/TestClient/Program.cs index 4f42d446..d0b9a366 100644 --- a/libsecondlife/examples/TestClient/Program.cs +++ b/libsecondlife/examples/TestClient/Program.cs @@ -116,6 +116,16 @@ namespace libsecondlife.TestClient accounts.Add(account); } + else if (arguments["first"] != null && arguments["last"] != null && arguments["loginkey"] != null) + { + // Taking a single login off the command-line + account = new LoginDetails(); + account.FirstName = arguments["first"]; + account.LastName = arguments["last"]; + account.WebLoginKey = arguments["loginkey"]; + + accounts.Add(account); + } else { throw new CommandLineArgumentsException();