Skip to content
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

Merged
merged 5 commits into from
Dec 7, 2016
Merged

Conversation

woogerboy21
Copy link
Contributor

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.

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())
Copy link
Member

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())?

Copy link
Contributor Author

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.

Copy link
Member

@ZeldaZach ZeldaZach left a 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

@woogerboy21 woogerboy21 merged commit c78eed5 into Cockatrice:master Dec 7, 2016
@woogerboy21 woogerboy21 deleted the fix_store_replays branch December 7, 2016 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants