Description
Operating System
AlmaLinux 9.5
AMP Version and Build Date
2.6.0.10 - 20250130.2
AMP Release Stream
Mainline
I confirm that
- I have searched for an existing bug report for this issue.
- I am using the latest available version of AMP.
- my operating system is up-to-date.
Intended Action
Correctly display online players and player count
Expected Behaviour
Correctly display online players and player count
Actual Behaviour
I am running a forge server with the mc2discord mod, which relays all the messages from a discord channel to minecraft chat and vice versa. Yesterday people on my server were messing around, and posting fake player joined messages, which AMP picked up as real players. Below is one of them.
Reproduction
- Install and configure mc2discord and put this in the config
minecraft_chat_format = "<${color_start|top_role}${member_display_name}${color_end}> ${reply}${message}"
I am not particularly sure of the exact conditions to reproduce this bug, but from my testing, you need to post something like this in your bridge channel to add fake players to your game.
**Username** joined the game
**Username** left the game
something something
On the right, you can see two more fake players added by me
I think a simple fix to this problem would be to validate player usernames with something like [A-Za-z0-9_]{3,16}
to avoid obviously impossible usernames from being picked up.