diff --git a/README.md b/README.md index b90f323..5ef3bd1 100644 --- a/README.md +++ b/README.md @@ -2,37 +2,10 @@ > [!CAUTION] > This project has moved to the Lncvrt Games originization. -> You can find the new repository [here](https://github.com/Lncvrt-Games/servers) +> You can find the new repository [here](https://github.com/Lncvrt-Games/servers). +> NOTE: This is also the branch that is being modified so it can continue to work for 1.8.2 and lower. +> Find old branch [here](https://github.com/BerryDash/server/tree/main) --- This is the new rewritten server source code for Berry Dash. - -## Setup - -> [!CAUTION] -> Do not share any keys with anybody, and store them safely on your computer. -> Encryption keys are meant to increase the security of the game and prevent cheaters. - -1. Upload the files on a webserver -2. Import database.sql into a MySQL/MariaDB database -3. Configure everything in `config/` folder (use `python3 genkeys.py` for `encryption.php`) -4. Use `git clone https://github.com/BerryDash/source.git` to clone the client and configure `Assets/Scripts/SensitiveInfo.cs` - -**Note:** - -When configuring keys in the client, `SERVER_RECEIVE_TRANSFER_KEY` will the key `SERVER_SEND_TRANSFER_KEY` from the server, and the other way around too. - -If this isn't configured properly, you will not be able to make requests to the server you have setup. - -Example: - -```cs -public static readonly string SERVER_DATABASE_PREFIX = "https://berrydash.lncvrt.xyz/database/"; -public static readonly string SERVER_RECEIVE_TRANSFER_KEY = "02b3c624552588ba0929e43fbad36221"; // This would be `SERVER_SEND_TRANSFER_KEY` from the server -public static readonly string SERVER_SEND_TRANSFER_KEY = "d4269db023de05fd59bf05378fa57324"; // This would be `SERVER_RECEIVE_TRANSFER_KEY` from the server -public static readonly string BAZOOKA_MANAGER_KEY = "19387a0e6b861e79d38657d0059bce8c"; -public static readonly string BAZOOKA_MANAGER_FILE_KEY = "7fb47db04d9babf42ee3713289516208"; -``` - -In conclusion: `SERVER_RECEIVE_TRANSFER_KEY` and `SERVER_SEND_TRANSFER_KEY` are swapped between client and server. This may be changed in the future. diff --git a/config/general.php b/config/general.php deleted file mode 100644 index 3081763..0000000 --- a/config/general.php +++ /dev/null @@ -1,6 +0,0 @@ -prepare(" diff --git a/database/getLatestVersion.php b/database/getLatestVersion.php index f1f38a8..fb761ec 100644 --- a/database/getLatestVersion.php +++ b/database/getLatestVersion.php @@ -1,5 +1,4 @@ execute(); $result_versions = $stmt->get_result(); $versions = array_map(fn($row) => ['id' => $row['id'], 'version' => $row['version'], 'releaseDate' => $row['releaseDate'], 'displayName' => empty($row['displayName']) ? $row['version'] : $row['displayName'], 'platforms' => json_decode($row['platforms']), 'downloadUrls' => json_decode($row['downloadUrls']), 'executables' => json_decode($row['executables']), 'category' => $row['category']], $result_versions->fetch_all(MYSQLI_ASSOC)); -$stmt = $conn->prepare("SELECT * FROM launchercategories ORDER BY id DESC"); -$stmt->execute(); - -$result_categories = $stmt->get_result(); -$rows = $result_categories->fetch_all(MYSQLI_ASSOC); - -$categories = []; -foreach ($rows as $row) { - $categories[$row['id']] = $row['name']; -} - -echo json_encode(["versions" => $versions, "categories" => $categories]); +echo json_encode($versions); $conn->close(); \ No newline at end of file diff --git a/database/loadAccount.php b/database/loadAccount.php index 84fda37..d47ebe2 100644 --- a/database/loadAccount.php +++ b/database/loadAccount.php @@ -1,17 +1,14 @@