-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix store replays #2301
Fix store replays #2301
Conversation
For whatever reason we have a variable in the servers ini to enable/disable the storing of replays but there is no code that uses that variable. At one time there was but in light of it being removed some were along the line this add's the ability back in for server owners to disable the storing of game replay data.
Moved the check for storing replay information into existing routine.
@@ -156,12 +154,15 @@ void Server_Game::storeGameInformation() | |||
while (allUsersIterator.hasNext()) { | |||
Server_AbstractUserInterface *userHandler = server->findUser(allUsersIterator.next()); | |||
if (userHandler) | |||
userHandler->sendProtocolItem(*sessionEvent); | |||
if (server->getStoreReplaysEnabled()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just put these into a single if (userHandler && server->getStoreReplaysEnabled())
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you were going to suggest that. The reason I didnt was due to me working on adding additional code in that block area that I ended up backing out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, contemplate addressing my comment
Combined lines per request
Fixed the server side store replay enable/disable functionality. Not sure when it was broken but we have a variable definition that allows owners to enable/disable the storing of replays but no underlying code that does the actual work. This fixes that.