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

Kick AFK Players #46

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

Kick AFK Players #46

wants to merge 9 commits into from

Conversation

Arc676
Copy link
Collaborator

@Arc676 Arc676 commented Feb 3, 2018

The Match class now keeps a record of how many rounds players spent exhibiting AFK-behavior. If a picker does not choose a winner or does not choose a card, this counts as AFK-activity. Choosing a card or picking a winner resets the player's AFK round count to 0. If any player's AFK round count is at least 2 during the COOLDOWN phase, that player is kicked, ungracefully i.e. the client's UI freezes. This should be improved (send a message to the client and show an error page or something).

Not picking a winner when there aren't enough choices does not count as AFK-behavior.

Kicking players for being AFK for too long adds a custom error message to the chat.

Closes #19.

Count rounds in which players do nothing
Check if 2 rounds or more when picking
Modified _pick_possible for use with AFK checking
Track AFK users by PID rather than name
Kicked users just stop updating
Abandoning participant takes default argument "left."
Kicking for AFK uses custom message
Pickers not choosing no longer considered AFK
Mark picker as AFK for a round if no winner is picked
Stop tracking player's AFK rounds when participant abandoned
Reset AFK round count on chat send
Added some documentation
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.

1 participant