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

Add /host and /skip commands. #102

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

uecasm
Copy link
Contributor

@uecasm uecasm commented Apr 3, 2014

"/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.

@uecasm
Copy link
Contributor Author

uecasm commented Apr 25, 2014

BTW, this resolves #68.

@GUIpsp
Copy link

GUIpsp commented Apr 26, 2014

👍

return false; // player not in this round (newly joined or already skipped)
}

logger.info(String.format("Skipping player %s in game %d (requested).",
Copy link
Owner

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.

@ajanata
Copy link
Owner

ajanata commented Apr 30, 2014

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. :)

@uecasm
Copy link
Contributor Author

uecasm commented Apr 30, 2014

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).

@uecasm
Copy link
Contributor Author

uecasm commented Apr 30, 2014

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.)

@ajanata
Copy link
Owner

ajanata commented May 1, 2014

Extra commits are fine by me.

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.

3 participants