Skip to content

Commit

Permalink
Fix: detection of invalid osu! login
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol committed Jun 16, 2019
1 parent 0e43bc7 commit 1ba546e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions App/SidePanelActionsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ private void DownloadAllMissing(object sender, object data = null)
OsuDownloadManager.Instance.DownloadBeatmaps(downloadableBeatmaps);
ShowDownloadManager();
}
else
{
_userDialogs.OkMessageBox("Invalid directory or osu! login/password supplied", "Error", MessageBoxType.Error);
}
}

private void FormUpdateTextClicked(object sender, EventArgs args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public bool Login(LoginData loginData)
if (i == clientCount)
{
var response = client.Login(loginAddress, loginDataStr);
if (response.IndexOf("Welcome, guest!", StringComparison.InvariantCultureIgnoreCase) > 0)
if (response.IndexOf("Log me on automatically each visit", StringComparison.InvariantCultureIgnoreCase) > 0)
return false;
cookies = client.CookieContainer;
}
Expand Down

0 comments on commit 1ba546e

Please sign in to comment.