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

Ignore players after the MaxPlayers limit is reached ; Crash ignored players on stage changes #54

Merged
merged 4 commits into from
Apr 27, 2024

Conversation

Istador
Copy link
Contributor

@Istador Istador commented Apr 27, 2024

  • Banned players are ignored, but they still send all their packages - mostly positional updates - to the server, so it's better to crash them to avoid unnecessary traffik.
  • And after reaching the max players setting, clients trying to connect are disconnected. The automatic reconnect will flood the server and its log with repeated connection attempts (as was the case with banned players in the past), so it's better to ignore and crash them as well.

@Sanae6
Copy link
Owner

Sanae6 commented Apr 27, 2024

Fix conflicts and then I'll merge it 👍

- use brackets when possible
- set client.Id and client.Name earlier
- use client.Id instead of header.Id
- rename firstConn to isClientNew
To make service discovery by internet scan bots harder.
Otherwise they keep sending all their packets (including positional updates) to the server which costs bandwidth and processing power.
…ayers limit

Otherwise they'll enter an endless disconnect-reconnnect loop spamming the server with new TCP connections.
@Sanae6 Sanae6 merged commit 4de654b into Sanae6:master Apr 27, 2024
1 check passed
@Istador Istador deleted the crash-ignored-players branch April 27, 2024 19:19
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.

2 participants