Add hooks

pull/503/head
Iluha 4 years ago
parent 0b324555a1
commit e76956c6bb

@ -502,7 +502,7 @@ namespace DepotDownloader
else else
{ {
var contentName = GetAppOrDepotName(INVALID_DEPOT_ID, appId); var contentName = GetAppOrDepotName(INVALID_DEPOT_ID, appId);
throw new ContentDownloaderException(String.Format("App {0} ({1}) is not available from this account.", appId, contentName)); throw new ContentDownloaderException(String.Format("[Error]|App {0} ({1}) is not available from this account.", appId, contentName));
} }
} }
@ -628,7 +628,7 @@ namespace DepotDownloader
if (!AccountHasAccess(depotId)) if (!AccountHasAccess(depotId))
{ {
Console.WriteLine("Depot {0} ({1}) is not available from this account.", depotId, contentName); Console.WriteLine("[Error]|Depot {0} ({1}) is not available from this account.", depotId, contentName);
return null; return null;
} }

@ -272,7 +272,7 @@ namespace DepotDownloader
{ {
do do
{ {
Console.Write("[Password]Enter account password for \"{0}\": ", username); Console.Write("[Password]|Enter account password for \"{0}\": ", username);
if (Console.IsInputRedirected) if (Console.IsInputRedirected)
{ {
password = Console.ReadLine(); password = Console.ReadLine();

@ -527,18 +527,18 @@ namespace DepotDownloader
} }
else if (connectionBackoff >= 10) else if (connectionBackoff >= 10)
{ {
Console.WriteLine("Could not connect to Steam after 10 tries"); Console.WriteLine("[Error]|Could not connect to Steam after 10 tries");
Abort(false); Abort(false);
} }
else if (!bAborted) else if (!bAborted)
{ {
if (bConnecting) if (bConnecting)
{ {
Console.WriteLine("Connection to Steam failed. Trying again"); Console.WriteLine("[Error]|Connection to Steam failed. Trying again");
} }
else else
{ {
Console.WriteLine("Lost connection to Steam. Reconnecting"); Console.WriteLine("[Error]|Lost connection to Steam. Reconnecting");
} }
Thread.Sleep(1000 * ++connectionBackoff); Thread.Sleep(1000 * ++connectionBackoff);
@ -569,7 +569,7 @@ namespace DepotDownloader
{ {
do do
{ {
Console.Write("[Guard]Please enter your 2 factor auth code from your authenticator app: "); Console.Write("[2FA]|Please enter your 2 factor auth code from your authenticator app: ");
logonDetails.TwoFactorCode = Console.ReadLine(); logonDetails.TwoFactorCode = Console.ReadLine();
} while (String.Empty == logonDetails.TwoFactorCode); } while (String.Empty == logonDetails.TwoFactorCode);
} }
@ -587,7 +587,7 @@ namespace DepotDownloader
} }
else else
{ {
Console.Write("Login key was expired. Please enter your password: "); Console.Write("[Password]|Login key was expired. Please enter your password: ");
logonDetails.Password = Util.ReadPassword(); logonDetails.Password = Util.ReadPassword();
} }
} }
@ -595,7 +595,7 @@ namespace DepotDownloader
{ {
do do
{ {
Console.Write("Please enter the authentication code sent to your email address: "); Console.Write("[Guard]|Please enter the authentication code sent to your email address: ");
logonDetails.AuthCode = Console.ReadLine(); logonDetails.AuthCode = Console.ReadLine();
} while (string.Empty == logonDetails.AuthCode); } while (string.Empty == logonDetails.AuthCode);
} }
@ -617,7 +617,7 @@ namespace DepotDownloader
if (loggedOn.Result == EResult.ServiceUnavailable) if (loggedOn.Result == EResult.ServiceUnavailable)
{ {
Console.WriteLine("Unable to login to Steam3: {0}", loggedOn.Result); Console.WriteLine("[Error]|Unable to login to Steam3: {0}", loggedOn.Result);
Abort(false); Abort(false);
return; return;
@ -625,7 +625,7 @@ namespace DepotDownloader
if (loggedOn.Result != EResult.OK) if (loggedOn.Result != EResult.OK)
{ {
Console.WriteLine("Unable to login to Steam3: {0}", loggedOn.Result); Console.WriteLine("[Error]|Unable to login to Steam3: {0}", loggedOn.Result);
Abort(); Abort();
return; return;
@ -645,7 +645,7 @@ namespace DepotDownloader
private void SessionTokenCallback(SteamUser.SessionTokenCallback sessionToken) private void SessionTokenCallback(SteamUser.SessionTokenCallback sessionToken)
{ {
Console.WriteLine("Got session token!"); Console.WriteLine("[Success]|Got session token!");
credentials.SessionToken = sessionToken.SessionToken; credentials.SessionToken = sessionToken.SessionToken;
} }
@ -653,7 +653,7 @@ namespace DepotDownloader
{ {
if (licenseList.Result != EResult.OK) if (licenseList.Result != EResult.OK)
{ {
Console.WriteLine("Unable to get license list: {0} ", licenseList.Result); Console.WriteLine("[Error]|Unable to get license list: {0} ", licenseList.Result);
Abort(); Abort();
return; return;

Loading…
Cancel
Save