Merge pull request #1361 from woogerboy21/servatrice_disable_replaystorage
Add option to servatrice to disable replay storage.
This commit is contained in:
commit
1c3e13109f
3 changed files with 9 additions and 0 deletions
|
@ -193,6 +193,11 @@ roomlist\1\game_types\3\name="GameType3"
|
||||||
; default is 120
|
; default is 120
|
||||||
max_game_inactivity_time=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]
|
[security]
|
||||||
; You may want to restrict the number of users that can connect to your server at any given time.
|
; 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;
|
authenticationMethod = AuthenticationNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug() << "Store Replays: " << settingsCache->value("game/store_replays", true).toBool();
|
||||||
qDebug() << "Client ID Required: " << clientIdRequired;
|
qDebug() << "Client ID Required: " << clientIdRequired;
|
||||||
bool maxUserLimitEnabled = settingsCache->value("security/enable_max_user_limit", false).toBool();
|
bool maxUserLimitEnabled = settingsCache->value("security/enable_max_user_limit", false).toBool();
|
||||||
qDebug() << "Maximum user limit enabled: " << maxUserLimitEnabled;
|
qDebug() << "Maximum user limit enabled: " << maxUserLimitEnabled;
|
||||||
|
|
|
@ -642,6 +642,9 @@ void Servatrice_DatabaseInterface::storeGameInformation(const QString &roomName,
|
||||||
if (!checkSql())
|
if (!checkSql())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!settingsCache->value("game/store_replays", 1).toBool() )
|
||||||
|
return;
|
||||||
|
|
||||||
QVariantList gameIds1, playerNames, gameIds2, userIds, replayNames;
|
QVariantList gameIds1, playerNames, gameIds2, userIds, replayNames;
|
||||||
QSetIterator<QString> playerIterator(allPlayersEver);
|
QSetIterator<QString> playerIterator(allPlayersEver);
|
||||||
while (playerIterator.hasNext()) {
|
while (playerIterator.hasNext()) {
|
||||||
|
|
Loading…
Reference in a new issue