[Game] Allow judges to enter any game regardless of restrictions

This commit is contained in:
Lukas Brübach 2026-09-18 16:47:00 +02:00
parent 7b39cf98d5
commit 60eedbd872
6 changed files with 190 additions and 3 deletions

View file

@ -465,7 +465,7 @@ Response::ResponseCode Server_Game::checkJoin(ServerInfo_User *user,
if (asJudge && !(user->user_level() & ServerInfo_User::IsJudge)) {
return Response::RespUserLevelTooLow;
}
if (!(overrideRestrictions && (user->user_level() & ServerInfo_User::IsModerator))) {
if (!(overrideRestrictions && (user->user_level() & (ServerInfo_User::IsModerator | ServerInfo_User::IsJudge)))) {
if ((_password != password) && !(spectator && !spectatorsNeedPassword)) {
return Response::RespWrongPassword;
}