diff --git a/servatrice/servatrice.ini.example b/servatrice/servatrice.ini.example index 814c3ab0..f8aeffa7 100644 --- a/servatrice/servatrice.ini.example +++ b/servatrice/servatrice.ini.example @@ -193,6 +193,11 @@ roomlist\1\game_types\3\name="GameType3" ; default is 120 max_game_inactivity_time=120 +; All actions during a game are recorded and stored in the database as a replay that all participants of +; the game can go back to and review after the game is closed. This can require a fairly large amount of +; storage to save all the information. Disable this option to prevent the storing of replay data in +; the database. Default value is true. +store_replays=true [security] ; You may want to restrict the number of users that can connect to your server at any given time. diff --git a/servatrice/src/servatrice.cpp b/servatrice/src/servatrice.cpp index df570f5d..0f56003c 100644 --- a/servatrice/src/servatrice.cpp +++ b/servatrice/src/servatrice.cpp @@ -162,6 +162,7 @@ bool Servatrice::initServer() authenticationMethod = AuthenticationNone; } + qDebug() << "Store Replays: " << settingsCache->value("game/store_replays", true).toBool(); qDebug() << "Client ID Required: " << clientIdRequired; bool maxUserLimitEnabled = settingsCache->value("security/enable_max_user_limit", false).toBool(); qDebug() << "Maximum user limit enabled: " << maxUserLimitEnabled; diff --git a/servatrice/src/servatrice_database_interface.cpp b/servatrice/src/servatrice_database_interface.cpp index e2b56a51..f6ba71b7 100644 --- a/servatrice/src/servatrice_database_interface.cpp +++ b/servatrice/src/servatrice_database_interface.cpp @@ -642,6 +642,9 @@ void Servatrice_DatabaseInterface::storeGameInformation(const QString &roomName, if (!checkSql()) return; + if (!settingsCache->value("game/store_replays", 1).toBool() ) + return; + QVariantList gameIds1, playerNames, gameIds2, userIds, replayNames; QSetIterator playerIterator(allPlayersEver); while (playerIterator.hasNext()) {