zmilla93 / SlimTrade

A trade UI overlay for Path of Exile
MIT License
122 stars 13 forks source link

Chat Scanner does not show Macro window if whisper contains a colon #70

Closed Tartarus762 closed 2 months ago

Tartarus762 commented 2 months ago

Describe the bug When using the Chat Scanner feature, if the message contains a colon, the scanner will not pick up the message even if it contains a search term.

Reproduce

  1. Open SlimTrade
  2. Click the overlay button at the top left of the screen
  3. Click the Chat Scanner feature
  4. Enter a search term (WTB)
  5. Set scanner to whispers only
  6. Receive message that contains a colon

Setting SlimTrade Version: 0.4.3 Operation System: Win 11

Additional context Works as expected if the message is exactly the same but without the colon.

Example message that will not work: WTB 1 x -1 Explicit Modifiers - 80, Total: 0d 4c

This message will work (no colon): @ReJackyBowNEC WTB 1 x -1 Explicit Modifiers - 80, Total 0d 4c

Tartarus762 commented 2 months ago

Some more observations:

Message works if the colon is not followed by a space.

The issue is likely with this regex:

(?<messageType>#|[$]|От кого|@[^\\s<>]+) ?(?<guildName><.+> )?(?<playerName>.+):(\\s+)(?<message>.+

zmilla93 commented 2 months ago

Good find. I'll pull in this change before making the next release.