8000 lbs: limit an account to 3 users by inada-s-ai[bot] · Pull Request #448 · inada-s/gdxsv · GitHub
[go: up one dir, main page]

Skip to content

lbs: limit an account to 3 users - #448

Merged
inada-s merged 1 commit into
masterfrom
ai/lbs-user-limit
Nov 9, 2026
Merged

inada-s merged 1 commit into
masterfrom
ai/lbs-user-limit

Conversation

@inada-s-ai
@inada-s-ai inada-s-ai Bot commented Nov 9, 2026
Copy link
Copy Markdown
Contributor

An account (login key) can now hold at most 3 users. lbsUserRegist with ****** on an account that already has 3 is refused, and no row is written. Accounts that are already over the limit keep their users and can still select them, but they cannot add more.

  • RegisterUser does the count and the insert in one statement (INSERT ... SELECT ... WHERE count < 3), so two clients of the same account cannot both get past the check. When the account is full, the handler logs the error and closes the connection, as it already did for a failed registration.
  • Test TestLbs_AccountUserLimit (pipe peers) does these steps:
    • Makes 3 users. The 4th ****** gets no answer, and the row count stays at 3.
    • The user list still shows the 3 users, and each of them can still be decided.
    • An account seeded with 4 users lists all 4, cannot add a 5th, and can decide its 4th.

Verified on windows-mini:

Not verified: what flycast shows when the registration is refused (the connection is closed).

Part of inada-s/ai-automation#146.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@inada-s
inada-s merged commit 1b54d5c into master Nov 9, 2026
2 checks passed
@inada-s
inada-s deleted the ai/lbs-user-limit branch November 9, 2026 10:51
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

0