Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-276819

Players can be kicked for spamming easier if the tick rate is low

XMLWordPrintable

    • Icon: Bug 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:

      1. Join a server and make sure you are not opped
      2. In console: /tick rate 1
      3. Send 9 chat messages within 30 seconds
      4. Wait 10 seconds
      5. Send 9 chat messages within 30 seconds
      6. Notice that you are kicked for spamming during step 5
      7. 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.

            Unassigned Unassigned
            Tis_awesomeness Tis_awesomeness
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: