Skip to content

Commit

Permalink
Login tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmgringo committed Aug 9, 2016
1 parent 86265ee commit 1e551a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion FeroxRev
2 changes: 1 addition & 1 deletion PoGo.NecroBot.Logic/Common/ApiFailureStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private async void DoLogin()
{
try
{
if (_session.Settings.AuthType != AuthType.Google || _session.Settings.AuthType != AuthType.Ptc)
if (_session.Settings.AuthType == AuthType.Google || _session.Settings.AuthType == AuthType.Ptc)
{
await _session.Client.Login.DoLogin();
}
Expand Down
6 changes: 3 additions & 3 deletions PoGo.NecroBot.Logic/State/LoginState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task<IState> Execute(ISession session, CancellationToken cancellati

try
{
if (session.Settings.AuthType != AuthType.Google || session.Settings.AuthType != AuthType.Ptc)
if (session.Settings.AuthType == AuthType.Google || session.Settings.AuthType == AuthType.Ptc)
{
await session.Client.Login.DoLogin();
}
Expand Down Expand Up @@ -117,9 +117,9 @@ public async Task<IState> Execute(ISession session, CancellationToken cancellati
await Task.Delay(2000, cancellationToken);
Environment.Exit(0);
}
catch (Exception)
catch (Exception e)
{
//Logger.Write(e.ToString());
Logger.Write(e.ToString());
await Task.Delay(20000, cancellationToken);
return this;
}
Expand Down

2 comments on commit 1e551a0

@theloser
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djdookie
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theloser Lol.
Here the code was logically wrong. The bot even tried to login, if your AuthType was anything. So you could have completely removed the if-part, which would also be wrong. So what is your statement here? ^^

Please sign in to comment.