Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions auth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,16 +597,24 @@ void KeyAuth::api::init()
else if (json[(XorStr("message"))] == XorStr("invalidver"))
{
std::string dl = json[(XorStr("download"))];
api::app_data.downloadLink = json[XorStr("download")];
if (dl == "")
{
MessageBoxA(0, XorStr("Version in the loader does match the one on the dashboard, and the download link on dashboard is blank.\n\nTo fix this, either fix the loader so it matches the version on the dashboard. Or if you intended for it to have different versions, update the download link on dashboard so it will auto-update correctly.").c_str(), NULL, MB_ICONERROR);
api::app_data.downloadLink = dl;
if (auto_open_download_url) {
if (dl.empty()) {
MessageBoxA(0, XorStr("Version in the loader does not match the one on the dashboard, and the download link on dashboard is blank.\n\nTo fix this, either fix the loader so it matches the version on the dashboard. Or if you intended for it to have different versions, update the download link on dashboard so it will auto-update correctly.").c_str(), NULL, MB_ICONERROR);
}
else {
ShellExecuteA(0, XorStr("open").c_str(), dl.c_str(), 0, 0, SW_SHOWNORMAL);
}
LI_FN(exit)(0);
}
else
{
ShellExecuteA(0, XorStr("open").c_str(), dl.c_str(), 0, 0, SW_SHOWNORMAL);
else {
if (dl.empty()) {
api::response.message = XorStr("Version in the loader does not match the one on the dashboard, and the download link on dashboard is blank. To fix this, either fix the loader so it matches the version on the dashboard. Or if you intended for it to have different versions, update the download link on dashboard so it will auto-update correctly.");
}
else {
api::response.message = XorStr("invalidver");
}
}
LI_FN(exit)(0);
}
}
else {
Expand Down
1 change: 1 addition & 0 deletions auth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ namespace KeyAuth {
bool block_proxy = false;
bool block_custom_ca = false;
bool block_private_dns = false;
bool auto_open_download_url = true;
static std::string expiry_remaining(const std::string& expiry);
static constexpr const char* kSavePath = "test.json";
static constexpr int kInitFailSleepMs = 1500;
Expand Down