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 room chat history #2698

Merged
merged 1 commit into from
May 10, 2017
Merged

Fix room chat history #2698

merged 1 commit into from
May 10, 2017

Conversation

woogerboy21
Copy link
Contributor

@woogerboy21 woogerboy21 commented May 7, 2017

Looks like an addition to the table shifted things. We probably should look into some how use the actual column names (if it can be done). But for now this should fix the server room chat history.

Related Ticket(s)

  • Fixes broken chat history in rooms (not sure if there is a ticket number)

Short roundup of the initial problem

When users would join rooms previous chat was presented, this was broke by a change in the table / room layout.

Looks like an addition to the table shifted things.  We probably  should look into some how use the actual column names (if it can be done).  But for now this should fix the server room chat history.
@woogerboy21 woogerboy21 added App - Servatrice Tickets relating to the servatrice application Defect - Basic labels May 7, 2017
@woogerboy21
Copy link
Contributor Author

I haven't had time to check out if the functionality is broken using the config to define rooms. Maybe some one else could do so? @ctrlaltca / @ZeldaZach

This fixes the chat history being broken when the rooms are defined by the db table.

@ZeldaZach ZeldaZach requested a review from ctrlaltca May 9, 2017 07:15
@woogerboy21
Copy link
Contributor Author

@ZeldaZach I looked into the way the server handles creating rooms from the config file. It actually does string based comparisons to the settings value(s) and as such should work perfectly fine with this change.

If anyone is interested in knowing were the servers block of code is for creating rooms based on configuration its:
https://github.com/Cockatrice/Cockatrice/blob/master/servatrice/src/servatrice.cpp#L287

In regards to my original statement about if we can use column headers instead of numerical value(s) for definitions. The way the server handles room creating from db definitions is some what odd. It runs a first query to pull the information about the rooms definitions out and then from that query runs a second to find out the game types defined for the room and then passes all that information to the room object. Not sure if you can reference column headers from query results with the way things are written. Maybe we can? Some one with a bit more know-how might be able to clear things up.

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.

Simple change.

@woogerboy21 woogerboy21 merged commit 1811bad into master May 10, 2017
@tooomm tooomm deleted the fix_room_chat_history branch May 10, 2017 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App - Servatrice Tickets relating to the servatrice application Defect - Basic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants