Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
1c3e1310
Commit
1c3e1310
authored
Aug 11, 2015
by
Zach
Browse files
Merge pull request #1361 from woogerboy21/servatrice_disable_replaystorage
Add option to servatrice to disable replay storage.
parents
26b95607
fefceac2
Changes
3
Hide whitespace changes
Inline
Side-by-side
servatrice/servatrice.ini.example
View file @
1c3e1310
...
@@ -193,6 +193,11 @@ roomlist\1\game_types\3\name="GameType3"
...
@@ -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.
...
...
servatrice/src/servatrice.cpp
View file @
1c3e1310
...
@@ -162,6 +162,7 @@ bool Servatrice::initServer()
...
@@ -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
;
...
...
servatrice/src/servatrice_database_interface.cpp
View file @
1c3e1310
...
@@ -642,6 +642,9 @@ void Servatrice_DatabaseInterface::storeGameInformation(const QString &roomName,
...
@@ -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
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment