Chat: read the host's own wording of each line

DECAL handed the original each line as the chat window shows it, tell links
included; the host now reports the same wording (DisplayText). Kill, rare,
combat and !report parsing and the chat frame read that, with tags stripped
for the frame exactly as before; the plugin's own formatter remains only for
a line the host did not word.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-09-25 12:45:49 +02:00
parent 5a94e1cf0b
commit 0af4efb6b6
3 changed files with 28 additions and 1 deletions

View file

@ -19,6 +19,12 @@ internal static class ChatLineText
public static string Of(in PluginChatMessage message)
{
// The host's own wording, tell links included, is the text the
// original was handed; the rest of this method is the fallback for a
// line the host did not word.
if (!string.IsNullOrEmpty(message.DisplayText))
return message.DisplayText;
string text = message.Text ?? string.Empty;
string sender = message.Sender ?? string.Empty;
bool own = string.IsNullOrEmpty(sender) || sender == "You";