diff --git a/database/canLoadClient.php b/database/canLoadClient.php index 17e3450..5c8f2f7 100644 --- a/database/canLoadClient.php +++ b/database/canLoadClient.php @@ -7,8 +7,10 @@ $clientVersion = $_SERVER['HTTP_CLIENTVERSION'] ?? "0"; if (($_SERVER['HTTP_REQUESTER'] ?? "0") != "BerryDashClient") { exitWithMessage("-1", false); } -if (isSupportedVersion($clientVersion)) { +if (isLatestVersion($clientVersion)) { echo "1"; +} else if (isBetaVersion($clientVersion)) { + echo "4"; } else if (isAllowedVersion($clientVersion)) { echo "3"; } else if (isAllowedVersion($clientVersion) && isAllowedDatabaseVersion($clientVersion)) { diff --git a/incl/util.php b/incl/util.php index ab2ddb4..00780f7 100644 --- a/incl/util.php +++ b/incl/util.php @@ -49,10 +49,16 @@ function exitWithMessage($message, $encrypt = true) { exit; } -function isSupportedVersion($version) { +function isLatestVersion($version) { global $latestVersion; if (!isset($latestVersion)) require __DIR__ . '/../config/general.php'; - return $version === $latestVersion || $version === $latestBetaVersion; + return $version === $latestVersion; +} + +function isBetaVersion($version) { + global $latestBetaVersion; + if (!isset($latestBetaVersion)) require __DIR__ . '/../config/general.php'; + return $version === $latestBetaVersion; } function isAllowedVersion($version) {