Chat Patches

Chat Patches

2M Downloads

(At least) one player's username appears twice - 201.5.2

Slooshie1 opened this issue ยท 14 comments

commented

Description

Simple. One person's (potentially others' as well, haven't checked) username appears twice in the chat, in the same line, before their chat message. This does not happen to someone else's username who was on the server.

How to reproduce

  1. Install chat patches
  2. Join a server
  3. Have different people send messages in the chat
  4. Hopefully one of them will have two usernames so you can reproduce the issue

Expected result

For the person in question to only have one username before their chat message

Log file link

latest.log

Specs and Details

Required information:

  • Windows 11 Home
  • Chat Patches 201.5.2
  • Quilt Loader 0.19.2 and QFAPI 7.0.5 with QSL 6.0.4
  • YetAnotherConfigLib 3.0.3 and Mod Menu 7.1.0
  • Mods:
    image
    image
    image
    image

Optional but suggested information:

Additional context

Screenshot 2023-07-13 170450

commented
  • could you send a log file with chat messages in it? it cuts off right after the ChatLog loads up messages.
  • also, does your server already modify player names or chat messages at all, and if so what mods/plugins cause it?

thanks, esp for the detailed bug report!

commented

I can send a new chat log in a bit, but we do have Styled Chat on the server. I noticed that the people who do NOT have a custom display name have duplicate usernames while people with custom display names, such as to change our colors, do not have this problem.

commented

I can also report I have this issue while running Essentials / Essentials chat on my personal server. Custom nicks do not have this issue while vanilla usernames are double.
chatlog.json (I hope this is long enough for you)

commented

tried the linked jar file, still the same. But now someone with a custom display name from Styled Chat has double usernames as well. It displays their vanilla username before their custom display name
image_2023-07-17_184506492

commented

I can report that with essentials / essentials chat the issue persists. No additional changes were noted between the regular mod and the linked above one. Vanilla users still have 2 names while those who are nicked only have the one.

commented

(idk why it auto closed, i specifically said "try")

i doubt it will fix but i was looking over the code and some of the player name checks seemed inconsistent, so if you guys could try this version (file looks the same as v201.5.2) i am interested to see if this helps at all.
bc i am on mobile the normal file link isn't letting me copy, so just go here, click on "jars", download it, unzip it, and add the normal looking file to your mods folder.

(warning: the version number and name is identical to the published one so maybe move the original one to another file or rename it)

commented

this is so weird, i literally just fixed what i thought was this same issue over in #96. ill have to do a deep-dive when i get back from my vacation.

commented
commented

Can confirm that this issue is resolved when using essentials / essentials chat. Both nicked users and users with vanilla usernames appear only once.

commented
commented

could you provide images of what it is supposed to look like vs what it actually ends up looking like?

i dont know of any servers with name formattings that aren't super over the top, so i can't really test this myself.

commented

The underlying issue hasn't been resolved i think. I just added the "<$>" setting changed check to prevent the mod do name formattings.
During the testing, essential /nick no longer works if I change the name formatting other than <$>

commented

If you are nicked into abc using EssentialsX, and the format is set to [$]
Expected:
<abc> hello world
Actual:
[(Player Name)] hello world

Name formatting ignored nickname, and used the real name instead.

commented

that's pretty weird, maybe it has to do with this line not checking if the string name and the cached name are the same.

!lastEmpty && !boundary && Config.getOption("chatNameFormat").changed() && lastMsg.vanilla()
(it only checks that player data is associated w the message and it was in vanilla format)
also, is the nickname a scoreboard/team (partially vanilla) thing or is it entirely Essentials?