-
Bug
-
Resolution: Unresolved
-
None
-
1.21.1, 24w38a, 24w39a, 1.21.2 Pre-Release 2, 1.21.2 Pre-Release 3, 1.21.2 Release Candidate 1, 1.21.2 Release Candidate 2, 1.21.2, 1.21.3, 24w46a, 1.21.4 Pre-Release 2, 1.21.4 Pre-Release 3, 1.21.4, 25w03a, 25w05a
-
None
-
Confirmed
-
Networking, Player
-
Low
-
Platform
Changing the tick rate affects that rate that chat spam detection "decays" over time. If the tick rate is low, players can get kicked for spamming even if they chat slower than the usual 1 message per second rate.
To reproduce:
- Join a server and make sure you are not opped
- In console: /tick rate 1
- Send 9 chat messages within 30 seconds
- Wait 10 seconds
- Send 9 chat messages within 30 seconds
- Notice that you are kicked for spamming during step 5
- Repeat steps 1-5 with /tick rate 20, notice that you are not kicked
Code analysis:
In ServerGamePacketListenerImpl, tick() decrements chatSpamTickCount every tick, but detectRateSpam() increments chatSpamTickCount by 20 regardless of the tick rate.