-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Fix so when the lobby of a demo is closed, the demo shuts down.
It used to be that closing the lobby of a demo user running a demo automatically ended the tournament, but that was when players were allowed to quit in the middle of a hand. Now that quitting in the middle of a hand is disallowed (#1605), a demo game may linger until the hand times out. When the max timeout was 180 seconds, it wasn't that big of a deal, but now that it's 9999, that can leave a demo lingering far too long.
Part of the problem is that demo events aren't actually flagged as demo events directly. Instead, some features that should be demo-only (like allowing a timeout of 9999) are gated based on whether the buy-in is zero or not. The problem is, teaching events may also have a zero buy-in (I think; it's been a while and I haven't reviewed how we've done them in the past).
The obvious solution is to add a demo column to the events table and to the relevant structures associated with event creation and running and then allow quitting in the middle of a hand in a demo game. There may be a "better" solution that would involve redoing how demos are done, but most likely such a better solution would still start out by adding a demo column to events, so that's what I'll do when I get to this issue.
Since this is easy, and since I want to let people know about custom SASS files, I'd like to do this "soon". OTOH, I started writing my status report (#1675) about two weeks ago and it's been "more than halfway" finished for a while and needs to go out. So, I'm adding the high priority label here but am not going to work on this quite yet.