Skip to content

Limit simultaneous challenges from one user#1098

Merged
AttackingOrDefending merged 1 commit intolichess-bot-devs:masterfrom
MarkZH:challenge-limit
Mar 31, 2025
Merged

Limit simultaneous challenges from one user#1098
AttackingOrDefending merged 1 commit intolichess-bot-devs:masterfrom
MarkZH:challenge-limit

Conversation

@MarkZH
Copy link
Copy Markdown
Collaborator

@MarkZH MarkZH commented Mar 31, 2025

Type of pull request:

  • Bug fix
  • Feature
  • Other

Description:

If an opponent sends multiple challenges is rapid succession to a bot, the challenges will be queued up for acceptance since there will be a delay before any are turned into an active game. This allows a single opponent to take up all of a bot's games.

This change adds the number of active challenges to the number of active games to limit the number of games from a single opponent.

Related Issues:

Closes #1097

Checklist:

  • I have read and followed the contribution guidelines.
  • I have added necessary documentation (if applicable).
  • The changes pass all existing tests.

Screenshots/logs (if applicable):

In order to limit the number of games with a single opponent, the number
of queued challenges from a single opponent must be limited as well.
This change adds the number of active challenges to the number of active
games to keep the eventual number of simultaneous games with a single
user under the max_simultaneous_games_per_user configuration.
@AttackingOrDefending AttackingOrDefending merged commit 9fbedf1 into lichess-bot-devs:master Mar 31, 2025
23 checks passed
@MarkZH MarkZH deleted the challenge-limit branch March 31, 2025 08:56
r0950336 pushed a commit to r0950336/lichess-bot that referenced this pull request Dec 31, 2025
In order to limit the number of games with a single opponent, the number
of queued challenges from a single opponent must be limited as well.
This change adds the number of active challenges to the number of active
games to keep the eventual number of simultaneous games with a single
user under the max_simultaneous_games_per_user configuration.
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.

max_simultaneous_games_per_user does not stop multiple simultaneous challenges from being accepted

2 participants