70CentsApple / ChatTools

Chat Tools 一个 Minecraft Fabric 辅助模组 | A Fabric client-side Minecraft Mod
GNU General Public License v3.0
13 stars 4 forks source link

Notifier tags responder messages #40

Open AlphaLeoli opened 1 month ago

AlphaLeoli commented 1 month ago

Bug description

There is an option in the notifier to ignore messages that you send. Now look at this screenshot here: image as you can see, the notifier tagged the "glhf" and the "gg KittyFish_", but it didn't tag the "thanks". This is because those first two responses are automatic, via the responder!

Steps to reproduce

  1. Turn on notifier, make sure ignore your own messages is on.
  2. make a responder
  3. say something in chat, and use the responder in chat. The responder will notify you but the message you sent manually will not

Expected behavior

notifier ignores messages sent with responder

Actual behavior

it notifies me on my own messages

Relevant logs

No response

Minecraft version

1.20.4

Mod version

2.2.1

Other information

No response

Check list

70CentsApple commented 1 month ago

Yeah, actually I have known that problem when I was developing this feature. It's a bit tricky to fix this, and this is not actually a critical problem, so just go ahead~

To deal with such dilemma, I had come up with two solutions at first: one would fix this problem, but it will ruin the order of dealing with messages; while the another one, which is used now, would lead to this tiny problem, but ensuing the dealing order is correct.

Both are imperfect, and it will take time to figure out the best solution.

AlphaLeoli commented 1 month ago

what if u made many a partial solution and then just made an option in the menu for what the user wants it to be

70CentsApple commented 1 month ago

yes perhaps, but after all, this is just a minor problem

AlphaLeoli commented 1 month ago

i found that using (?s).*(?<Person>[a-zA-Z0-9_]{3,16})(?s).*(?<Users>ArsonIsSoCool|AlphaLeoli)(?s).* to match the name fixes it but still does the rest the same. it would be nice if u could put a current ign variable in the regex tho, since i have 27 accounts 💀