-
Notifications
You must be signed in to change notification settings - Fork 398
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
Add /host and /skip commands. #102
base: master
Are you sure you want to change the base?
Conversation
BTW, this resolves #68. |
👍 |
return false; // player not in this round (newly joined or already skipped) | ||
} | ||
|
||
logger.info(String.format("Skipping player %s in game %d (requested).", |
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.
Please include the username that requested the skip. Probably have to pass them in only for the log message... Alternatively the log message could be emitted from the handler. Just seems like it'd be useful for tracking abuse.
Allowing a skip when the round would end up being unplayable just seems silly. You're not going to be able to continue the game until that person gets back anyway... Or maybe someone just joined and you will. Hmm. Okay, I guess it makes sense. :) |
Bear in mind that most of this was written as an alternative to the auto-skip timer, back when that kept resetting games for no readily apparent reason. So it was intentionally written to avoid resets no matter what. In practice, what usually happens (at least in my playtests) is that you're just wanting to skip someone who has said that they're leaving the game but didn't actually click the button (and you don't want to wait for them to ping timeout) -- or just going AFK for longer than expected. (Possibly where having that "stand up" feature might be useful.) Often the same player comes back in later anyway. But if not, the game just spins uselessly for a little while; it doesn't really do any harm except waste a few black cards and judging turns. I'm occasionally tempted to go back and make the same changes to the auto-skip, actually. That way there'd be no resets at all (unless the host manually hit Stop Game). |
Actually, wait -- I'm a derp. This doesn't resolve #68 yet; I meant it to do so but somehow left that code out. I'll fix that up shortly too, along with most of your other suggestions. (I'll just add the changes onto this PR as extra commits by default; if you prefer, let me know and I'll rebase the PR and/or split it into separate chunks.) |
Extra commits are fine by me. |
"/host playername": changes the host of the game to the specified player (who must already be in the game). Useful for tournament-style or other prearranged play to hand over "ownership" of a game without having to create a separate game. Also useful to "recover" host status if the host is disconnected, but this requires the cooperation of whoever became host in the meantime.
"/skip playername": skips the specified player in the same manner as the idle timer, except that it does not increment their skip count and will never cause a game reset (it will just skip the round if there aren't enough players). Mostly intended to allow manually skipping an AFK player when playing with the idle timer disabled. (This was one of the things I added before I found the bugfix for the idle timer.)
Both of these commands will only work for admins and hosts.