generate toml from scratch

This commit is contained in:
Lion Kortlepel 2022-07-09 22:42:38 +02:00
parent 6c1d02a425
commit f8d622352f
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -62,7 +62,8 @@ void SetComment(CommentsT& Comments, const std::string& Comment) {
* whether it is in TConfig.cpp or the configuration file.
*/
void TConfig::FlushToFile() {
auto data = toml::parse<toml::preserve_comments>(mConfigFileName);
// auto data = toml::parse<toml::preserve_comments>(mConfigFileName);
auto data = toml::value {};
data["General"][StrAuthKey.data()] = Application::Settings.Key;
SetComment(data["General"][StrAuthKey.data()].comments(), " AuthKey has to be filled out in order to run the server");
data["General"][StrDebug.data()] = Application::Settings.DebugModeEnabled;