diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 42fb2980..ae0df17f 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -78,7 +78,7 @@ namespace DepotDownloader ContentServerClient.StorageSession session = null; try { - session = csClient.OpenStorage( ( uint )depotId, ( uint )depotVersion, ( uint )cellId ); + session = csClient.OpenStorage( ( uint )depotId, ( uint )depotVersion, ( uint )cellId, credentials ); } catch ( Steam2Exception ex ) { diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs index 06cbba9a..c3dd5a96 100644 --- a/DepotDownloader/Steam3Session.cs +++ b/DepotDownloader/Steam3Session.cs @@ -58,8 +58,7 @@ namespace DepotDownloader Console.Write( "Connecting to Steam3..." ); - this.connectTime = DateTime.Now; - this.steamClient.Connect(); + Connect(); } public Credentials WaitForCredentials() @@ -68,6 +67,13 @@ namespace DepotDownloader return credentials; } + + void Connect() + { + this.connectTime = DateTime.Now; + this.steamClient.Connect(); + } + public void Disconnect() { steamClient.Disconnect(); @@ -106,7 +112,18 @@ namespace DepotDownloader { var msg = callback as SteamUser.LogOnCallback; - if ( msg.Result != EResult.OK ) + if ( msg.Result == EResult.AccountLogonDenied ) + { + Console.WriteLine( "This account is protected by Steam Guard. Please enter the authentication code sent to your email address." ); + Console.Write( "Auth Code: " ); + + logonDetails.AuthCode = Console.ReadLine(); + + Console.Write( "Retrying Steam3 connection..." ); + Connect(); + continue; + } + else if ( msg.Result != EResult.OK ) { Console.WriteLine( "Unable to login to Steam3: {0}", msg.Result ); steamUser.LogOff();