Skip to content

Commit

Permalink
Merge branch 'MultiMC:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Neptune650 authored Feb 2, 2024
2 parents faf3c96 + 87852db commit bb30191
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
2 changes: 2 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ cmake -DCMAKE_INSTALL_PREFIX=../install ../src
make -j8 install
```

**NOTE:** If you want to treat all warnings as errors add -DCMAKE_BUILD_TYPE=Debug to the above cmake command

You can use IDEs like KDevelop or QtCreator to open the CMake project if you want to work on the code.

### Installing Qt using the installer (optional)
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ set(CMAKE_C_STANDARD_REQUIRED true)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 11)
include(GenerateExportHeader)
set(CMAKE_CXX_FLAGS " -Wall -pedantic -Werror -Wno-deprecated-declarations -D_GLIBCXX_USE_CXX11_ABI=0 -fstack-protector-strong --param=ssp-buffer-size=4 ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS " -Wall -pedantic -Wno-deprecated-declarations -D_GLIBCXX_USE_CXX11_ABI=0 -fstack-protector-strong --param=ssp-buffer-size=4 ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE " -O3 -D_FORTIFY_SOURCE=2 ${CMAKE_CXX_FLAGS_RELEASE}")
if(UNIX AND APPLE)
set(CMAKE_CXX_FLAGS " -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror=return-type -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -Werror=return-type -O0")

# Fix build with Qt 5.13
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
Expand Down
42 changes: 39 additions & 3 deletions launcher/minecraft/auth/steps/XboxAuthorizationStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QNetworkRequest>
#include <QJsonParseError>
#include <QJsonDocument>

#include "minecraft/auth/AuthRequest.h"
#include "minecraft/auth/Parsers.h"
Expand Down Expand Up @@ -121,14 +120,36 @@ bool XboxAuthorizationStep::processSTSError(
return true;
}
switch(errorCode) {
case 2148916233:{
case 2148916227: {
// NOTE: this is the error experienced by a number of people on Discord using dodgy alt accounts
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("Your XBox Live account has been banned by Microsoft for violating the XBox Community Standards.\nThis may happen if your account was shared or resold.")
);
return true;
}
case 2148916229: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account is linked to a family and your parent or guardian has not given you permission to play online.")
);
return true;
}
case 2148916233: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account does not have an XBox Live profile. Buy the game on %1 first.")
.arg("<a href=\"https://www.minecraft.net/en-us/store/minecraft-java-edition\">minecraft.net</a>")
);
return true;
}
case 2148916234: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This account has not accepted the XBox Terms of Service. Please log in online and accept them.")
);
return true;
}
case 2148916235: {
// NOTE: this is the Grulovia error
emit finished(
Expand All @@ -137,11 +158,26 @@ bool XboxAuthorizationStep::processSTSError(
);
return true;
}
case 2148916236: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account requires proof of age to play. Please login to %1 to provide proof of age.")
.arg("<a href=\"https://login.live.com/login.srf\">login.live.com</a>")
);
return true;
}
case 2148916237: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account has reached its playtime limit and has been blocked from logging in.")
);
return true;
}
case 2148916238: {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("This Microsoft account is underaged and is not linked to a family.\n\nPlease set up your account according to %1.")
.arg("<a href=\"https://help.minecraft.net/hc/en-us/articles/4403181904525\">help.minecraft.net</a>")
.arg("<a href=\"https://help.minecraft.net/hc/en-us/articles/4408968616077\">help.minecraft.net</a>")
);
return true;
}
Expand Down

0 comments on commit bb30191

Please sign in to comment.