Commit fefceac2 authored by woogerboy21's avatar woogerboy21
Browse files

Add option to servatrice to disable replay storage.

parent de1b925b
......@@ -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.
......
......@@ -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;
......
......@@ -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<QString> playerIterator(allPlayersEver);
while (playerIterator.hasNext()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment