diff --git a/.gitignore b/.gitignore index 16e5721..4b06a99 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .idea/ -.sentry-native/ *.orig *.toml boost_* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 28d43b2..8833955 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -108,8 +108,8 @@ A BeamMP-Developer must review your code in detail, and leave a review. If this 5. Run `git submodule update --init --recursive`. 6. Make a new branch for your feature or fix from the branch you are on. You can do this via `git checkout -b `. See [this section on branches](#branches) for more info on branch naming. 7. Install all dependencies. Those are usually listed in the `README.md` in the branch you're in, or, more reliably, in one of the files in `.github/workflows` (if you can read `yaml`). -8. Run CMake to configure the project. You can find tutorials on this online. You will want to tell CMake to build with `CMAKE_BUILD_TYPE=Debug`, for example by passing it to CMake via the commandline switch `-DCMAKE_BUILD_TYPE=Debug`. You may also want to turn off sentry by setting `SENTRY_BACKEND=none` (for example via commandline switch `-DSENTRY_BACKEND=none`). An example invocation on Linux with GNU make would be -`cmake . -DCMAKE_BUILD_TYPE=Debug -DSENTRY_BACKEND=none` . +8. Run CMake to configure the project. You can find tutorials on this online. You will want to tell CMake to build with `CMAKE_BUILD_TYPE=Debug`, for example by passing it to CMake via the commandline switch `-DCMAKE_BUILD_TYPE=Debug`. An example invocation on Linux with GNU make would be +`cmake . -DCMAKE_BUILD_TYPE=Debug` . 9. Build the `BeamMP-Server` target to build the BeamMP-Server, or the `BeamMP-Server-tests` target to build the unit-tests (does not include a working server). In the example from 8. (on Linux), you could build with `make BeamMP-Server`, `make -j BeamMP-Server` or `cmake --build . --parallel --target BeamMP-Server` . Or, on Windows, (in Visual Studio), you would just press some big green "run" or "debug" button. 10. When making changes, refer to [this section on how to commit properly](#how-to-commit). Not following those guidelines will result in your changes being rejected, so please take a look. 11. Make sure to add Unit-tests with `doctest` if you build new stuff. You can find examples all over the latest version of the codebase (search for `TEST_CASE`). diff --git a/include/Common.h b/include/Common.h index 6094dbb..85f423f 100644 --- a/include/Common.h +++ b/include/Common.h @@ -139,7 +139,6 @@ void RegisterThread(const std::string& str); #define KB 1024llu #define MB (KB * 1024llu) #define GB (MB * 1024llu) -#define SSU_UNRAW SECRET_SENTRY_URL #define _file_basename std::filesystem::path(__FILE__).filename().string() #define _line std::to_string(__LINE__) diff --git a/include/Settings.h b/include/Settings.h index 3034c1c..016bef1 100644 --- a/include/Settings.h +++ b/include/Settings.h @@ -68,8 +68,6 @@ struct Settings { // Keys have their TOML section name as prefix // [Misc] - Misc_SendErrorsShowMessage, - Misc_SendErrors, Misc_ImScaredOfUpdates, Misc_UpdateReminderTime, diff --git a/src/Settings.cpp b/src/Settings.cpp index d2393cd..a8dfdb8 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -35,8 +35,6 @@ Settings::Settings() { { General_Debug, false }, { General_AllowGuests, true }, { General_InformationPacket, true }, - { Misc_SendErrorsShowMessage, true }, - { Misc_SendErrors, true }, { Misc_ImScaredOfUpdates, true }, { Misc_UpdateReminderTime, "30s" } }; @@ -56,8 +54,6 @@ Settings::Settings() { { { "General", "Debug" }, { General_Debug, READ_WRITE } }, { { "General", "AllowGuests" }, { General_AllowGuests, READ_WRITE } }, { { "General", "InformationPacket" }, { General_InformationPacket, READ_WRITE } }, - { { "Misc", "SendErrorsShowMessage" }, { Misc_SendErrorsShowMessage, READ_WRITE } }, - { { "Misc", "SendErrors" }, { Misc_SendErrors, READ_WRITE } }, { { "Misc", "ImScaredOfUpdates" }, { Misc_ImScaredOfUpdates, READ_WRITE } }, { { "Misc", "UpdateReminderTime" }, { Misc_UpdateReminderTime, READ_WRITE } } }; diff --git a/src/TConfig.cpp b/src/TConfig.cpp index 66c0eff..145013c 100644 --- a/src/TConfig.cpp +++ b/src/TConfig.cpp @@ -61,8 +61,6 @@ static constexpr std::string_view EnvStrInformationPacket = "BEAMMP_INFORMATION_ static constexpr std::string_view StrPassword = "Password"; // Misc -static constexpr std::string_view StrSendErrors = "SendErrors"; -static constexpr std::string_view StrSendErrorsMessageEnabled = "SendErrorsShowMessage"; static constexpr std::string_view StrHideUpdateMessages = "ImScaredOfUpdates"; static constexpr std::string_view StrUpdateReminderTime = "UpdateReminderTime"; @@ -152,12 +150,8 @@ void TConfig::FlushToFile() { // Misc data["Misc"][StrHideUpdateMessages.data()] = Application::Settings.getAsBool(Settings::Key::Misc_ImScaredOfUpdates); SetComment(data["Misc"][StrHideUpdateMessages.data()].comments(), " Hides the periodic update message which notifies you of a new server version. You should really keep this on and always update as soon as possible. For more information visit https://wiki.beammp.com/en/home/server-maintenance#updating-the-server. An update message will always appear at startup regardless."); - data["Misc"][StrSendErrors.data()] = Application::Settings.getAsBool(Settings::Key::Misc_SendErrors); data["Misc"][StrUpdateReminderTime.data()] = Application::Settings.getAsString(Settings::Key::Misc_UpdateReminderTime); SetComment(data["Misc"][StrUpdateReminderTime.data()].comments(), " Specifies the time between update reminders. You can use any of \"s, min, h, d\" at the end to specify the units seconds, minutes, hours or days. So 30d or 0.5min will print the update message every 30 days or half a minute."); - SetComment(data["Misc"][StrSendErrors.data()].comments(), " If SendErrors is `true`, the server will send helpful info about crashes and other issues back to the BeamMP developers. This info may include your config, who is on your server at the time of the error, and similar general information. This kind of data is vital in helping us diagnose and fix issues faster. This has no impact on server performance. You can opt-out of this system by setting this to `false`"); - data["Misc"][StrSendErrorsMessageEnabled.data()] = Application::Settings.getAsBool(Settings::Key::Misc_SendErrorsShowMessage); - SetComment(data["Misc"][StrSendErrorsMessageEnabled.data()].comments(), " You can turn on/off the SendErrors message you get on startup here"); std::stringstream Ss; Ss << "# This is the BeamMP-Server config file.\n" "# Help & Documentation: `https://docs.beammp.com/server/server-maintenance/`\n" @@ -265,9 +259,7 @@ void TConfig::ParseFromFile(std::string_view name) { TryReadValue(data, "General", StrLogChat, EnvStrLogChat, Settings::Key::General_LogChat); TryReadValue(data, "General", StrAllowGuests, EnvStrAllowGuests, Settings::Key::General_AllowGuests); // Misc - TryReadValue(data, "Misc", StrSendErrors, "", Settings::Key::Misc_SendErrors); TryReadValue(data, "Misc", StrHideUpdateMessages, "", Settings::Key::Misc_ImScaredOfUpdates); - TryReadValue(data, "Misc", StrSendErrorsMessageEnabled, "", Settings::Key::Misc_SendErrorsShowMessage); TryReadValue(data, "Misc", StrUpdateReminderTime, "", Settings::Key::Misc_UpdateReminderTime); } catch (const std::exception& err) {