diff --git a/HellionChat/Ui/ChatLogWindow.cs b/HellionChat/Ui/ChatLogWindow.cs index ca990aa..a884336 100644 --- a/HellionChat/Ui/ChatLogWindow.cs +++ b/HellionChat/Ui/ChatLogWindow.cs @@ -192,11 +192,28 @@ public sealed class ChatLogWindow : Window return; } + // --------------------------------------------------------------- + // Cherry-picked from ChatTwo upstream ee7768ac (Infiziert90, 2026-05-16) + // - Replace the chat input when args.AddIfNotPresent / args.Input starts + // with a slash. Vanilla actions like the Friend List "/tell" entry and + // other plugins push slash commands through these args; appending them + // to existing text would produce inputs like "test/tell user@world". + // --------------------------------------------------------------- if (args.AddIfNotPresent != null && !Chat.Contains(args.AddIfNotPresent)) - Chat += args.AddIfNotPresent; + { + if (args.AddIfNotPresent.StartsWith('/')) + Chat = args.AddIfNotPresent; + else + Chat += args.AddIfNotPresent; + } if (args.Input != null) - Chat += args.Input; + { + if (args.Input.StartsWith('/')) + Chat = args.Input; + else + Chat += args.Input; + } var (info, reason, target) = (args.ChannelSwitchInfo, args.TellReason, args.TellTarget);