diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8fdc316..ef49340 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ updates: # noise down while still catching transitive security advisories within # a few days of disclosure. - package-ecosystem: nuget - directory: /ChatTwo + directory: /HellionChat schedule: interval: weekly day: monday diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af16057..c579df5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,15 +42,15 @@ jobs: Expand-Archive -Force -Path dalamud.zip -DestinationPath $hooks - name: Restore - run: dotnet restore ChatTwo/ChatTwo.csproj + run: dotnet restore HellionChat/HellionChat.csproj - name: Build (Release) - run: dotnet build ChatTwo/ChatTwo.csproj --configuration Release --no-restore + run: dotnet build HellionChat/HellionChat.csproj --configuration Release --no-restore - name: Upload build output uses: actions/upload-artifact@v7 with: name: HellionChat-build-${{ github.run_number }} - path: ChatTwo/bin/Release/**/HellionChat/** + path: HellionChat/bin/Release/**/HellionChat/** if-no-files-found: warn retention-days: 14 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c05a8e2..228d646 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -62,10 +62,10 @@ jobs: queries: security-extended - name: Restore - run: dotnet restore ChatTwo/ChatTwo.csproj + run: dotnet restore HellionChat/HellionChat.csproj - name: Build (Release) - run: dotnet build ChatTwo/ChatTwo.csproj --configuration Release --no-restore + run: dotnet build HellionChat/HellionChat.csproj --configuration Release --no-restore - name: Perform CodeQL analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e1cf33..e8dd56d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ name: Release # - the tag name (filtered by on.tags = v*, validated again at runtime # against ^v\d+\.\d+\.\d+$ before being used in any string) # All other values are either repo-controlled (paths under -# ChatTwo/bin/Release derived from Get-ChildItem) or pinned URLs to +# HellionChat/bin/Release derived from Get-ChildItem) or pinned URLs to # goatcorp / GitHub. Nothing from a webhook event payload (issue/PR # titles, commit messages, etc.) flows into a run-step. @@ -60,16 +60,16 @@ jobs: Expand-Archive -Force -Path dalamud.zip -DestinationPath $hooks - name: Build (Release) - run: dotnet build ChatTwo/ChatTwo.csproj --configuration Release + run: dotnet build HellionChat/HellionChat.csproj --configuration Release - name: Locate latest.zip id: locate shell: pwsh run: | - $zip = Get-ChildItem -Path ChatTwo\bin\Release -Recurse -Filter latest.zip | Select-Object -First 1 + $zip = Get-ChildItem -Path HellionChat\bin\Release -Recurse -Filter latest.zip | Select-Object -First 1 if (-not $zip) { - throw "latest.zip not found under ChatTwo\bin\Release" + throw "latest.zip not found under HellionChat\bin\Release" } Write-Host "Found: $($zip.FullName)" "path=$($zip.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append @@ -100,7 +100,7 @@ jobs: } $version = $tag.Substring(1) - $yamlPath = "ChatTwo/HellionChat.yaml" + $yamlPath = "HellionChat/HellionChat.yaml" $raw = Get-Content -Path $yamlPath -Raw $marker = "changelog: |-" diff --git a/ChatTwo/Properties/AssemblyInfo.cs b/ChatTwo/Properties/AssemblyInfo.cs deleted file mode 100644 index 123e4be..0000000 --- a/ChatTwo/Properties/AssemblyInfo.cs +++ /dev/null @@ -1 +0,0 @@ -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ChatTwo.Tests")] diff --git a/ChatTwo.sln b/HellionChat.sln similarity index 51% rename from ChatTwo.sln rename to HellionChat.sln index 3f09dbc..fa2740a 100755 --- a/ChatTwo.sln +++ b/HellionChat.sln @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatTwo", "ChatTwo\ChatTwo.csproj", "{739F75E6-B65F-41EF-9D90-F7BC519E4875}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatTwo.Tests", "ChatTwo.Tests\ChatTwo.Tests.csproj", "{A9FE423A-240C-4EDA-ACC6-21474B562128}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HellionChat", "HellionChat\HellionChat.csproj", "{739F75E6-B65F-41EF-9D90-F7BC519E4875}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -14,9 +12,5 @@ Global {739F75E6-B65F-41EF-9D90-F7BC519E4875}.Debug|Any CPU.Build.0 = Debug|Any CPU {739F75E6-B65F-41EF-9D90-F7BC519E4875}.Release|Any CPU.ActiveCfg = Release|Any CPU {739F75E6-B65F-41EF-9D90-F7BC519E4875}.Release|Any CPU.Build.0 = Release|Any CPU - {A9FE423A-240C-4EDA-ACC6-21474B562128}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A9FE423A-240C-4EDA-ACC6-21474B562128}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A9FE423A-240C-4EDA-ACC6-21474B562128}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A9FE423A-240C-4EDA-ACC6-21474B562128}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/ChatTwo/AutoTellTabsService.cs b/HellionChat/AutoTellTabsService.cs similarity index 99% rename from ChatTwo/AutoTellTabsService.cs rename to HellionChat/AutoTellTabsService.cs index 5234b0c..4d16d27 100644 --- a/ChatTwo/AutoTellTabsService.cs +++ b/HellionChat/AutoTellTabsService.cs @@ -1,14 +1,14 @@ using System; using System.Collections.Generic; using System.Linq; -using ChatTwo.Code; -using ChatTwo.GameFunctions.Types; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.GameFunctions.Types; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; -namespace ChatTwo; +namespace HellionChat; // Hellion Chat — Auto-Tell-Tabs. // diff --git a/HellionChat/ChatTwoConflictDetector.cs b/HellionChat/ChatTwoConflictDetector.cs new file mode 100644 index 0000000..ad53edb --- /dev/null +++ b/HellionChat/ChatTwoConflictDetector.cs @@ -0,0 +1,27 @@ +using System.Linq; +using HellionChat.Resources; +using Dalamud.Plugin; + +namespace HellionChat; + +internal static class ChatTwoConflictDetector +{ + private const string UpstreamInternalName = "ChatTwo"; + + public static void ThrowIfChatTwoIsLoaded(IDalamudPluginInterface pluginInterface) + { + var conflict = pluginInterface.InstalledPlugins + .FirstOrDefault(p => + p.InternalName == UpstreamInternalName && + p.IsLoaded); + + if (conflict is null) + return; + + var message = HellionStrings.ChatTwoConflictTitle + "\n\n" + + HellionStrings.ChatTwoConflictBody + "\n\n" + + HellionStrings.ChatTwoConflictAction; + + throw new System.InvalidOperationException(message); + } +} diff --git a/ChatTwo/Chunk.cs b/HellionChat/Chunk.cs similarity index 98% rename from ChatTwo/Chunk.cs rename to HellionChat/Chunk.cs index bfde9a7..e155ed1 100755 --- a/ChatTwo/Chunk.cs +++ b/HellionChat/Chunk.cs @@ -1,8 +1,8 @@ -using ChatTwo.Code; +using HellionChat.Code; using Dalamud.Game.Text.SeStringHandling; using MessagePack; -namespace ChatTwo; +namespace HellionChat; [Union(0, typeof(TextChunk))] [Union(1, typeof(IconChunk))] diff --git a/ChatTwo/Code/ChatCode.cs b/HellionChat/Code/ChatCode.cs similarity index 96% rename from ChatTwo/Code/ChatCode.cs rename to HellionChat/Code/ChatCode.cs index 94a06f0..32b717a 100755 --- a/ChatTwo/Code/ChatCode.cs +++ b/HellionChat/Code/ChatCode.cs @@ -1,6 +1,6 @@ using Dalamud.Game.Text; -namespace ChatTwo.Code; +namespace HellionChat.Code; public class ChatCode { @@ -91,13 +91,10 @@ public class ChatCode public override bool Equals(object? obj) { - if (obj == null) - return false; - if (obj is not ChatCode code) return false; - return GetHashCode() == code.GetHashCode(); + return Type == code.Type && Source == code.Source && Target == code.Target; } public override int GetHashCode() diff --git a/ChatTwo/Code/ChatSource.cs b/HellionChat/Code/ChatSource.cs similarity index 98% rename from ChatTwo/Code/ChatSource.cs rename to HellionChat/Code/ChatSource.cs index d2f4fe5..73e9701 100755 --- a/ChatTwo/Code/ChatSource.cs +++ b/HellionChat/Code/ChatSource.cs @@ -1,6 +1,6 @@ using Dalamud.Game.Text; -namespace ChatTwo.Code; +namespace HellionChat.Code; [Flags] public enum ChatSource : ushort diff --git a/ChatTwo/Code/ChatSourceExt.cs b/HellionChat/Code/ChatSourceExt.cs similarity index 95% rename from ChatTwo/Code/ChatSourceExt.cs rename to HellionChat/Code/ChatSourceExt.cs index eeb7908..d3fa5d3 100755 --- a/ChatTwo/Code/ChatSourceExt.cs +++ b/HellionChat/Code/ChatSourceExt.cs @@ -1,6 +1,6 @@ -using ChatTwo.Resources; +using HellionChat.Resources; -namespace ChatTwo.Code; +namespace HellionChat.Code; internal static class ChatSourceExt { diff --git a/ChatTwo/Code/ChatType.cs b/HellionChat/Code/ChatType.cs similarity index 98% rename from ChatTwo/Code/ChatType.cs rename to HellionChat/Code/ChatType.cs index 727d722..ab591a6 100755 --- a/ChatTwo/Code/ChatType.cs +++ b/HellionChat/Code/ChatType.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.Code; +namespace HellionChat.Code; public enum ChatType : ushort { diff --git a/ChatTwo/Code/ChatTypeExt.cs b/HellionChat/Code/ChatTypeExt.cs similarity index 99% rename from ChatTwo/Code/ChatTypeExt.cs rename to HellionChat/Code/ChatTypeExt.cs index 5d54d30..962ef40 100755 --- a/ChatTwo/Code/ChatTypeExt.cs +++ b/HellionChat/Code/ChatTypeExt.cs @@ -1,8 +1,8 @@ -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Game.Config; -namespace ChatTwo.Code; +namespace HellionChat.Code; internal static class ChatTypeExt { diff --git a/ChatTwo/Code/InputChannel.cs b/HellionChat/Code/InputChannel.cs similarity index 96% rename from ChatTwo/Code/InputChannel.cs rename to HellionChat/Code/InputChannel.cs index 10e7846..c18424e 100755 --- a/ChatTwo/Code/InputChannel.cs +++ b/HellionChat/Code/InputChannel.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.Code; +namespace HellionChat.Code; public enum InputChannel : uint { diff --git a/ChatTwo/Code/InputChannelExt.cs b/HellionChat/Code/InputChannelExt.cs similarity index 99% rename from ChatTwo/Code/InputChannelExt.cs rename to HellionChat/Code/InputChannelExt.cs index 3339c1d..6fd89e5 100755 --- a/ChatTwo/Code/InputChannelExt.cs +++ b/HellionChat/Code/InputChannelExt.cs @@ -1,6 +1,6 @@ using Lumina.Excel.Sheets; -namespace ChatTwo.Code; +namespace HellionChat.Code; internal static class InputChannelExt { diff --git a/ChatTwo/Commands.cs b/HellionChat/Commands.cs similarity index 98% rename from ChatTwo/Commands.cs rename to HellionChat/Commands.cs index a3b6386..20d6aa9 100755 --- a/ChatTwo/Commands.cs +++ b/HellionChat/Commands.cs @@ -1,6 +1,6 @@ using Dalamud.Game.Command; -namespace ChatTwo; +namespace HellionChat; internal sealed class Commands : IDisposable { diff --git a/ChatTwo/Configuration.cs b/HellionChat/Configuration.cs similarity index 99% rename from ChatTwo/Configuration.cs rename to HellionChat/Configuration.cs index 531d12d..7d33dda 100755 --- a/ChatTwo/Configuration.cs +++ b/HellionChat/Configuration.cs @@ -1,8 +1,8 @@ using System.Collections; -using ChatTwo.Code; -using ChatTwo.GameFunctions.Types; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.GameFunctions.Types; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud; using Dalamud.Configuration; using Dalamud.Game.ClientState.Keys; @@ -10,7 +10,7 @@ using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Interface.FontIdentifier; using Dalamud.Bindings.ImGui; -namespace ChatTwo; +namespace HellionChat; [Serializable] public class ConfigKeyBind diff --git a/ChatTwo/EmoteCache.cs b/HellionChat/EmoteCache.cs similarity index 98% rename from ChatTwo/EmoteCache.cs rename to HellionChat/EmoteCache.cs index a2c58bf..f2c818c 100644 --- a/ChatTwo/EmoteCache.cs +++ b/HellionChat/EmoteCache.cs @@ -8,7 +8,7 @@ using Dalamud.Bindings.ImGui; using SixLabors.ImageSharp; using SixLabors.ImageSharp.PixelFormats; -namespace ChatTwo; +namespace HellionChat; public static class EmoteCache { @@ -192,7 +192,7 @@ public static class EmoteCache } else { - var content = await new HttpClient().GetAsync(EmotePath.Format(emote.Id)); + var content = await Client.GetAsync(EmotePath.Format(emote.Id)); RawData = await content.Content.ReadAsByteArrayAsync(); await using var stream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.Read); diff --git a/ChatTwo/Export/MessageExporter.cs b/HellionChat/Export/MessageExporter.cs similarity index 99% rename from ChatTwo/Export/MessageExporter.cs rename to HellionChat/Export/MessageExporter.cs index 3cadaa4..d7e9ea2 100644 --- a/ChatTwo/Export/MessageExporter.cs +++ b/HellionChat/Export/MessageExporter.cs @@ -1,8 +1,8 @@ using System.Globalization; using System.Text; -using ChatTwo.Code; +using HellionChat.Code; -namespace ChatTwo.Export; +namespace HellionChat.Export; internal enum ExportFormat { diff --git a/ChatTwo/FontManager.cs b/HellionChat/FontManager.cs similarity index 91% rename from ChatTwo/FontManager.cs rename to HellionChat/FontManager.cs index aa3f25f..df83ef0 100644 --- a/ChatTwo/FontManager.cs +++ b/HellionChat/FontManager.cs @@ -6,7 +6,7 @@ using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Interface.Utility; using Dalamud.Bindings.ImGui; -namespace ChatTwo; +namespace HellionChat; public class FontManager { @@ -39,11 +39,18 @@ public class FontManager } else { - GameSymFont = new HttpClient().GetAsync("https://img.finalfantasyxiv.com/lds/pc/global/fonts/FFXIV_Lodestone_SSF.ttf") - .Result - .Content - .ReadAsByteArrayAsync() - .Result; + // Dispose HttpClient and HttpResponseMessage to avoid socket + // exhaustion on repeated cold-start downloads. GetAwaiter().GetResult() + // unwraps AggregateException so failures surface cleanly. A full + // async refactor of the constructor would be cleaner but is out of + // scope for v1.0.0 — tracked in the backlog. + using var client = new HttpClient(); + using var response = client + .GetAsync("https://img.finalfantasyxiv.com/lds/pc/global/fonts/FFXIV_Lodestone_SSF.ttf") + .GetAwaiter() + .GetResult(); + response.EnsureSuccessStatusCode(); + GameSymFont = response.Content.ReadAsByteArrayAsync().GetAwaiter().GetResult(); Dalamud.Utility.FilesystemUtil.WriteAllBytesSafe(filePath, GameSymFont); } diff --git a/ChatTwo/GameFunctions/Chat.cs b/HellionChat/GameFunctions/Chat.cs similarity index 99% rename from ChatTwo/GameFunctions/Chat.cs rename to HellionChat/GameFunctions/Chat.cs index b6f3b5f..20790ab 100755 --- a/ChatTwo/GameFunctions/Chat.cs +++ b/HellionChat/GameFunctions/Chat.cs @@ -1,8 +1,8 @@ using System.Text; -using ChatTwo.Code; -using ChatTwo.GameFunctions.Types; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.GameFunctions.Types; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Game.Config; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Hooking; @@ -22,7 +22,7 @@ using Lumina.Text.ReadOnly; using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.AtkValueType; -namespace ChatTwo.GameFunctions; +namespace HellionChat.GameFunctions; internal sealed unsafe class Chat : IDisposable { diff --git a/ChatTwo/GameFunctions/ChatBox.cs b/HellionChat/GameFunctions/ChatBox.cs similarity index 94% rename from ChatTwo/GameFunctions/ChatBox.cs rename to HellionChat/GameFunctions/ChatBox.cs index 3cbc6e7..1730e56 100644 --- a/ChatTwo/GameFunctions/ChatBox.cs +++ b/HellionChat/GameFunctions/ChatBox.cs @@ -1,10 +1,10 @@ using System.Text; -using ChatTwo.Resources; +using HellionChat.Resources; using Dalamud.Memory; using FFXIVClientStructs.FFXIV.Client.System.String; using FFXIVClientStructs.FFXIV.Client.UI; -namespace ChatTwo.GameFunctions; +namespace HellionChat.GameFunctions; public unsafe class ChatBox { diff --git a/ChatTwo/GameFunctions/Context.cs b/HellionChat/GameFunctions/Context.cs similarity index 95% rename from ChatTwo/GameFunctions/Context.cs rename to HellionChat/GameFunctions/Context.cs index aa64a5d..e1d3cb6 100755 --- a/ChatTwo/GameFunctions/Context.cs +++ b/HellionChat/GameFunctions/Context.cs @@ -1,9 +1,9 @@ -using ChatTwo.Util; +using HellionChat.Util; using FFXIVClientStructs.FFXIV.Client.UI.Agent; using FFXIVClientStructs.FFXIV.Client.UI.Info; using FFXIVClientStructs.FFXIV.Client.UI.Misc; -namespace ChatTwo.GameFunctions; +namespace HellionChat.GameFunctions; internal sealed unsafe class Context { diff --git a/ChatTwo/GameFunctions/GameFunctions.cs b/HellionChat/GameFunctions/GameFunctions.cs similarity index 95% rename from ChatTwo/GameFunctions/GameFunctions.cs rename to HellionChat/GameFunctions/GameFunctions.cs index ad7bff7..31b8970 100755 --- a/ChatTwo/GameFunctions/GameFunctions.cs +++ b/HellionChat/GameFunctions/GameFunctions.cs @@ -16,7 +16,7 @@ using Lumina.Excel; using Lumina.Excel.Sheets; using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.AtkValueType; -namespace ChatTwo.GameFunctions; +namespace HellionChat.GameFunctions; internal unsafe class GameFunctions : IDisposable { @@ -249,9 +249,15 @@ internal unsafe class GameFunctions : IDisposable private nint ResolveTextCommandPlaceholderDetour(nint a1, byte* placeholderText, byte a3, byte a4) { + // The detour is only invoked through the hook, so the hook should + // never be null here, but the nullable field declaration forces us + // to handle the theoretical race during teardown. + if (ResolveTextCommandPlaceholderHook is null) + return nint.Zero; + var placeholder = MemoryHelper.ReadStringNullTerminated((nint) placeholderText); if (ReplacementName == null || placeholder != Placeholder) - return ResolveTextCommandPlaceholderHook!.Original(a1, placeholderText, a3, a4); + return ResolveTextCommandPlaceholderHook.Original(a1, placeholderText, a3, a4); MemoryHelper.WriteString(PlaceholderNamePtr, ReplacementName); ReplacementName = null; diff --git a/ChatTwo/GameFunctions/KeybindManager.cs b/HellionChat/GameFunctions/KeybindManager.cs similarity index 99% rename from ChatTwo/GameFunctions/KeybindManager.cs rename to HellionChat/GameFunctions/KeybindManager.cs index d15bd73..2aa202d 100644 --- a/ChatTwo/GameFunctions/KeybindManager.cs +++ b/HellionChat/GameFunctions/KeybindManager.cs @@ -1,16 +1,16 @@ using System.Numerics; -using ChatTwo.Code; -using ChatTwo.GameFunctions.Types; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.GameFunctions.Types; +using HellionChat.Util; using Dalamud.Game.ClientState.Keys; using Dalamud.Game.Config; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.System.String; using FFXIVClientStructs.FFXIV.Client.UI; using Dalamud.Bindings.ImGui; -using ModifierFlag = ChatTwo.GameFunctions.Types.ModifierFlag; +using ModifierFlag = HellionChat.GameFunctions.Types.ModifierFlag; -namespace ChatTwo.GameFunctions; +namespace HellionChat.GameFunctions; internal enum KeyboardSource { Game, diff --git a/ChatTwo/GameFunctions/Party.cs b/HellionChat/GameFunctions/Party.cs similarity index 95% rename from ChatTwo/GameFunctions/Party.cs rename to HellionChat/GameFunctions/Party.cs index f92945a..8326fb8 100755 --- a/ChatTwo/GameFunctions/Party.cs +++ b/HellionChat/GameFunctions/Party.cs @@ -1,10 +1,10 @@ -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Interface.ImGuiNotification; using FFXIVClientStructs.FFXIV.Client.UI.Agent; using FFXIVClientStructs.FFXIV.Client.UI.Info; -namespace ChatTwo.GameFunctions; +namespace HellionChat.GameFunctions; internal static unsafe class Party { diff --git a/ChatTwo/GameFunctions/Types/ChannelSwitchInfo.cs b/HellionChat/GameFunctions/Types/ChannelSwitchInfo.cs similarity index 86% rename from ChatTwo/GameFunctions/Types/ChannelSwitchInfo.cs rename to HellionChat/GameFunctions/Types/ChannelSwitchInfo.cs index 343ac7b..d419715 100755 --- a/ChatTwo/GameFunctions/Types/ChannelSwitchInfo.cs +++ b/HellionChat/GameFunctions/Types/ChannelSwitchInfo.cs @@ -1,6 +1,6 @@ -using ChatTwo.Code; +using HellionChat.Code; -namespace ChatTwo.GameFunctions.Types; +namespace HellionChat.GameFunctions.Types; internal class ChannelSwitchInfo { internal InputChannel? Channel { get; } diff --git a/ChatTwo/GameFunctions/Types/ChatActivatedArgs.cs b/HellionChat/GameFunctions/Types/ChatActivatedArgs.cs similarity index 92% rename from ChatTwo/GameFunctions/Types/ChatActivatedArgs.cs rename to HellionChat/GameFunctions/Types/ChatActivatedArgs.cs index ba4a377..2297dc0 100755 --- a/ChatTwo/GameFunctions/Types/ChatActivatedArgs.cs +++ b/HellionChat/GameFunctions/Types/ChatActivatedArgs.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.GameFunctions.Types; +namespace HellionChat.GameFunctions.Types; internal sealed class ChatActivatedArgs { diff --git a/ChatTwo/GameFunctions/Types/Keybind.cs b/HellionChat/GameFunctions/Types/Keybind.cs similarity index 85% rename from ChatTwo/GameFunctions/Types/Keybind.cs rename to HellionChat/GameFunctions/Types/Keybind.cs index 1218184..98e7fad 100755 --- a/ChatTwo/GameFunctions/Types/Keybind.cs +++ b/HellionChat/GameFunctions/Types/Keybind.cs @@ -1,6 +1,6 @@ using Dalamud.Game.ClientState.Keys; -namespace ChatTwo.GameFunctions.Types; +namespace HellionChat.GameFunctions.Types; internal class Keybind { diff --git a/ChatTwo/GameFunctions/Types/ModifierFlag.cs b/HellionChat/GameFunctions/Types/ModifierFlag.cs similarity index 71% rename from ChatTwo/GameFunctions/Types/ModifierFlag.cs rename to HellionChat/GameFunctions/Types/ModifierFlag.cs index 3a8c459..1669bc9 100755 --- a/ChatTwo/GameFunctions/Types/ModifierFlag.cs +++ b/HellionChat/GameFunctions/Types/ModifierFlag.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.GameFunctions.Types; +namespace HellionChat.GameFunctions.Types; [Flags] public enum ModifierFlag diff --git a/ChatTwo/GameFunctions/Types/RotateMode.cs b/HellionChat/GameFunctions/Types/RotateMode.cs similarity index 60% rename from ChatTwo/GameFunctions/Types/RotateMode.cs rename to HellionChat/GameFunctions/Types/RotateMode.cs index 366fc72..0c83953 100755 --- a/ChatTwo/GameFunctions/Types/RotateMode.cs +++ b/HellionChat/GameFunctions/Types/RotateMode.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.GameFunctions.Types; +namespace HellionChat.GameFunctions.Types; internal enum RotateMode { diff --git a/ChatTwo/GameFunctions/Types/TellHistoryInfo.cs b/HellionChat/GameFunctions/Types/TellHistoryInfo.cs similarity index 87% rename from ChatTwo/GameFunctions/Types/TellHistoryInfo.cs rename to HellionChat/GameFunctions/Types/TellHistoryInfo.cs index 14bfa7c..4831a1c 100755 --- a/ChatTwo/GameFunctions/Types/TellHistoryInfo.cs +++ b/HellionChat/GameFunctions/Types/TellHistoryInfo.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.GameFunctions.Types; +namespace HellionChat.GameFunctions.Types; internal sealed class TellHistoryInfo { diff --git a/ChatTwo/GameFunctions/Types/TellReason.cs b/HellionChat/GameFunctions/Types/TellReason.cs similarity index 69% rename from ChatTwo/GameFunctions/Types/TellReason.cs rename to HellionChat/GameFunctions/Types/TellReason.cs index f779633..9546064 100755 --- a/ChatTwo/GameFunctions/Types/TellReason.cs +++ b/HellionChat/GameFunctions/Types/TellReason.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.GameFunctions.Types; +namespace HellionChat.GameFunctions.Types; public enum TellReason { diff --git a/ChatTwo/GameFunctions/Types/TellTarget.cs b/HellionChat/GameFunctions/Types/TellTarget.cs similarity index 91% rename from ChatTwo/GameFunctions/Types/TellTarget.cs rename to HellionChat/GameFunctions/Types/TellTarget.cs index 03be83d..b6151c2 100755 --- a/ChatTwo/GameFunctions/Types/TellTarget.cs +++ b/HellionChat/GameFunctions/Types/TellTarget.cs @@ -1,7 +1,7 @@ using Dalamud.Game.ClientState.Objects.SubKinds; using FFXIVClientStructs.FFXIV.Client.Game.Character; -namespace ChatTwo.GameFunctions.Types; +namespace HellionChat.GameFunctions.Types; [Serializable] public class TellTarget @@ -30,6 +30,9 @@ public class TellTarget public unsafe void FromTarget(IPlayerCharacter target) { + if (target.Address == nint.Zero) + return; + Name = target.Name.TextValue; World = target.HomeWorld.RowId; ContentId = ((Character*)target.Address)->ContentId; diff --git a/ChatTwo/ChatTwo.csproj b/HellionChat/HellionChat.csproj similarity index 72% rename from ChatTwo/ChatTwo.csproj rename to HellionChat/HellionChat.csproj index 69b12b1..bfae8dc 100644 --- a/ChatTwo/ChatTwo.csproj +++ b/HellionChat/HellionChat.csproj @@ -4,20 +4,29 @@ 0.1.0 is our bootstrap release; the underlying Chat 2 base is called out in the yaml changelog so users can see what it derives from. --> - 0.6.1 + 1.0.0 enable - + + true + HellionChat - ChatTwo + HellionChat + + diff --git a/ChatTwo/HellionChat.yaml b/HellionChat/HellionChat.yaml similarity index 50% rename from ChatTwo/HellionChat.yaml rename to HellionChat/HellionChat.yaml index 1d916fe..d264e52 100755 --- a/ChatTwo/HellionChat.yaml +++ b/HellionChat/HellionChat.yaml @@ -1,14 +1,15 @@ name: Hellion Chat author: JonKazama-Hellion -punchline: Chat 2 with privacy controls aligned to EU, US and JP rules +punchline: Chat replacement with privacy controls aligned to EU, US and JP rules — based on Chat 2 (EUPL-1.2) description: |- - Hellion Chat is built on top of Chat 2 with one removal and a stack - of privacy controls on top. Tabs, channel filters, RGB colours, - emotes, screenshot mode, IPC integration and the chat replacement - window itself work the same. The optional webinterface that Chat 2 - ships is intentionally not part of this fork because it serves a - different use case from the smaller default footprint Hellion Chat - is built around. + Hellion Chat is a privacy-focused chat replacement for FINAL FANTASY XIV + based on the Chat 2 codebase (EUPL-1.2). One feature is intentionally + removed (the optional webinterface) and a stack of privacy controls is + added on top. Tabs, channel filters, RGB colours, emotes, screenshot + mode, IPC integration and the chat replacement window itself work the + same. The webinterface is intentionally not part of Hellion Chat because + it serves a different use case from the smaller default footprint this + plugin is built around. On top of that, Hellion Chat adds privacy and data-handling controls designed to align with the modern data protection rules that apply @@ -18,7 +19,7 @@ description: |- channel, history can be wiped retroactively, and stored data can be exported on demand. - Key additions on top of Chat 2: + Key privacy and data-handling features: - Channel whitelist with a Privacy-First default - Per-channel retention with a daily background sweep @@ -28,7 +29,7 @@ description: |- Full History) - Bilingual UI (English and German) with live language switching - Independent plugin state — own config file and database directory, - so Hellion Chat does not share state with the upstream plugin + so Hellion Chat does not share state with upstream Chat 2 Based on Chat 2 by Infi and Anna, licensed under EUPL-1.2. @@ -37,10 +38,10 @@ description: |- other Hellion Online Media plugins/tools. repo_url: https://github.com/JonKazama-Hellion/HellionChat accepts_feedback: true -icon_url: https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/ChatTwo/images/icon.png +icon_url: https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/icon.png image_urls: - - https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/ChatTwo/images/chatWindow.png - - https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/ChatTwo/images/withSimpleTweaks.png + - https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/chatWindow.png + - https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/withSimpleTweaks.png tags: - Social - UI @@ -48,6 +49,105 @@ tags: - Replacement - Privacy changelog: |- + **Hellion Chat 1.0.0 — Standalone Major Release** + + First fully standalone release. Internal cleanup plus a sweep of + pre-existing correctness, security, threading and resource-leak + fixes carried over from the upstream codebase. No user action + required — auto-update applies cleanly, configuration and database + paths unchanged. + + Standalone identity: + + - Code namespace consolidated from ChatTwo.* to HellionChat.* across + all source files + - IPC channels migrated from ChatTwo.* to HellionChat.* (6 channels: + Register, Available, Unregister, Invoke, GetChatInputState, + ChatInputStateChanged) — third-party plugins that bound to the old + channels need to be updated; none known at release time + - ImGui popup ID renamed to hellionchat-context-popup + - Repository folder restructured (ChatTwo/ → HellionChat/), all CI + and build paths updated accordingly + - Public-facing descriptions reworded from upstream-fork framing to + standalone framing (Chat 2 attribution preserved per EUPL-1.2) + - Colour preset 'ChatTwo Default' is now 'Klassik (Chat 2 Default)' + + Safety: + + - Plugin now refuses to load when upstream Chat 2 is also active — + bilingual conflict message in EN/DE, throw before any subsystem + initialization, prevents the runtime crash that previously occurred + when both plugins replaced the same chat window in parallel + - SQLite native binary bumped to 3.50.3 (CVE-2025-6965 memory + corruption from aggregate-term overflow, CVE-2025-7709) + - NuGet restore now honors packages.lock.json so transitive + dependencies don't drift between machines or CI runs + + Crash-class fixes (formerly latent in upstream): + + - MathUtil.HasOverlap now uses a correct AABB test; identical or + edge-touching rectangles are no longer reported as non-overlapping + - ChatCode.Equals compares fields directly instead of GetHashCode; + removes the hash-collision anti-pattern + - IpcManager.Dispose uses UnregisterAction to match the matching + RegisterAction call; previous mismatch leaked the action + subscription on every plugin reload + - ExtraChat.Dispose now unsubscribes all three IPC subscriptions + (was only the first); leaks closed + - TellTarget.FromTarget guards against a zero IPlayerCharacter.Address + before dereferencing the unsafe Character* cast + - GameFunctions ResolveTextCommandPlaceholderDetour null-checks the + Hook reference instead of using the null-forgiving operator + - Popout.cs and SettingsTabs/Tabs.cs bounds-check list indexing so + a tab drop or empty-worlds list no longer crashes the UI + - Debugger.cs now declares IDisposable so the existing Dispose runs + + Correctness fixes: + + - GlobalParametersCache.GetValue captures Cache into a local before + the bounds check, so a concurrent Refresh can't slip a different + array between check and read + - IconUtil binary search bounds initialized to entries.Length-1 and + reset on redirect-restart; entries.Length==0 short-circuits + - Sheets.WorldsOnDatacenter now compares DataCenter.RowId (was + Region.RowId) so it actually returns same-DC worlds + - Message.cs back-reference loop iterates the processed Sender/Content + properties so chunks added by CheckMessageContent get Message set + - Language.zh-Hans Webinterface_Start_Success corrected to + "网页界面已启动" (was "网页界面已停止") + + Threading and async: + + - AutoTranslate Entries/ValidEntries are now serialized behind a + single lock; the preload worker thread and main thread no longer + race on the underlying dictionary/hash set + - Privacy retention and cleanup workers bound their framework-refresh + waits to 5 seconds with a logged timeout; a hung framework tick can + no longer deadlock the background worker + + Resource handling: + + - EmoteCache reuses the static HttpClient instead of allocating a new + one per call (closed socket leak) + - FontManager wraps HttpClient/HttpResponseMessage in using-blocks + and adds EnsureSuccessStatusCode; failed downloads no longer + silently produce a zero-byte font file + - SearchSelector mixes the row index into the ImGui ID stack so + selectables don't collapse to a single ambiguous ID + - SettingsTabs/Chat blocked-emote add-button now opens its selector + popup on left-click + + Performance: + + - DbViewer text export caches filteredHistory.Count once instead of + re-enumerating the IEnumerable on every batch (O(N) instead of + O(N²) on large histories) + + License attribution (NOTICE.md, COPYRIGHT, THIRD_PARTY_NOTICES.md + and the Credits section in README) is unchanged. + + Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2). + **Hellion Chat 0.6.1 — Pop-Out Discoverability & /tell Auto-Pop-Out** - Pop-out button now visible in the chat header (no more hunting diff --git a/ChatTwo/InputHistoryService.cs b/HellionChat/InputHistoryService.cs similarity index 98% rename from ChatTwo/InputHistoryService.cs rename to HellionChat/InputHistoryService.cs index bc65431..cc653db 100644 --- a/ChatTwo/InputHistoryService.cs +++ b/HellionChat/InputHistoryService.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace ChatTwo; +namespace HellionChat; // Hellion Chat — v0.6.0 shared input history. Replaces the embedded // ChatLogWindow.InputBacklog so that pop-out windows with their own diff --git a/ChatTwo/Ipc/ExtraChat.cs b/HellionChat/Ipc/ExtraChat.cs similarity index 94% rename from ChatTwo/Ipc/ExtraChat.cs rename to HellionChat/Ipc/ExtraChat.cs index 70061da..b04521e 100644 --- a/ChatTwo/Ipc/ExtraChat.cs +++ b/HellionChat/Ipc/ExtraChat.cs @@ -1,6 +1,6 @@ using Dalamud.Plugin.Ipc; -namespace ChatTwo.Ipc; +namespace HellionChat.Ipc; public sealed class ExtraChat : IDisposable { @@ -49,6 +49,8 @@ public sealed class ExtraChat : IDisposable public void Dispose() { OverrideChannelGate.Unsubscribe(OnOverrideChannel); + ChannelCommandColoursGate.Unsubscribe(OnChannelCommandColours); + ChannelNamesGate.Unsubscribe(OnChannelNames); } private void OnOverrideChannel(OverrideInfo info) diff --git a/ChatTwo/Ipc/TypingIpc.cs b/HellionChat/Ipc/TypingIpc.cs similarity index 91% rename from ChatTwo/Ipc/TypingIpc.cs rename to HellionChat/Ipc/TypingIpc.cs index a367da6..51991fd 100644 --- a/ChatTwo/Ipc/TypingIpc.cs +++ b/HellionChat/Ipc/TypingIpc.cs @@ -1,7 +1,7 @@ -using ChatTwo.Code; +using HellionChat.Code; using Dalamud.Plugin.Ipc; -namespace ChatTwo.Ipc; +namespace HellionChat.Ipc; using ChatInputState = (bool InputVisible, bool InputFocused, bool HasText, bool IsTyping, int TextLength, ChatType ChannelType); @@ -19,8 +19,8 @@ internal sealed class TypingIpc : IDisposable { Plugin = plugin; - StateQueryGate = Plugin.Interface.GetIpcProvider("ChatTwo.GetChatInputState"); - StateChangedGate = Plugin.Interface.GetIpcProvider("ChatTwo.ChatInputStateChanged"); + StateQueryGate = Plugin.Interface.GetIpcProvider("HellionChat.GetChatInputState"); + StateChangedGate = Plugin.Interface.GetIpcProvider("HellionChat.ChatInputStateChanged"); StateQueryGate.RegisterFunc(GetState); } diff --git a/ChatTwo/IpcManager.cs b/HellionChat/IpcManager.cs similarity index 86% rename from ChatTwo/IpcManager.cs rename to HellionChat/IpcManager.cs index 06d653b..5db49a7 100755 --- a/ChatTwo/IpcManager.cs +++ b/HellionChat/IpcManager.cs @@ -2,7 +2,7 @@ using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Plugin.Ipc; -namespace ChatTwo; +namespace HellionChat; internal sealed class IpcManager : IDisposable { @@ -15,15 +15,15 @@ internal sealed class IpcManager : IDisposable public IpcManager() { - RegisterGate = Plugin.Interface.GetIpcProvider("ChatTwo.Register"); + RegisterGate = Plugin.Interface.GetIpcProvider("HellionChat.Register"); RegisterGate.RegisterFunc(Register); - AvailableGate = Plugin.Interface.GetIpcProvider("ChatTwo.Available"); + AvailableGate = Plugin.Interface.GetIpcProvider("HellionChat.Available"); - UnregisterGate = Plugin.Interface.GetIpcProvider("ChatTwo.Unregister"); + UnregisterGate = Plugin.Interface.GetIpcProvider("HellionChat.Unregister"); UnregisterGate.RegisterAction(Unregister); - InvokeGate = Plugin.Interface.GetIpcProvider("ChatTwo.Invoke"); + InvokeGate = Plugin.Interface.GetIpcProvider("HellionChat.Invoke"); AvailableGate.SendMessage(); } @@ -47,7 +47,7 @@ internal sealed class IpcManager : IDisposable public void Dispose() { - UnregisterGate.UnregisterFunc(); + UnregisterGate.UnregisterAction(); RegisterGate.UnregisterFunc(); Registered.Clear(); } diff --git a/ChatTwo/Message.cs b/HellionChat/Message.cs similarity index 97% rename from ChatTwo/Message.cs rename to HellionChat/Message.cs index d52eb5b..804747e 100755 --- a/ChatTwo/Message.cs +++ b/HellionChat/Message.cs @@ -1,6 +1,6 @@ using System.Text; -using ChatTwo.Code; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Util; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using System.Text.RegularExpressions; @@ -8,7 +8,7 @@ using Dalamud.Game.Text; using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Client.UI.Agent; -namespace ChatTwo; +namespace HellionChat; public partial class Message { @@ -49,7 +49,10 @@ public partial class Message ExtraChatChannel = extraChatChannel; Hash = GenerateHash(); - foreach (var chunk in sender.Concat(content)) + // Iterate the processed Content list (returned by CheckMessageContent) + // rather than the raw constructor parameter — chunks added or replaced + // by CheckMessageContent must also have their back-reference set. + foreach (var chunk in Sender.Concat(Content)) chunk.Message = this; } diff --git a/ChatTwo/MessageManager.cs b/HellionChat/MessageManager.cs similarity index 99% rename from ChatTwo/MessageManager.cs rename to HellionChat/MessageManager.cs index e81075d..d4b1fe4 100644 --- a/ChatTwo/MessageManager.cs +++ b/HellionChat/MessageManager.cs @@ -1,9 +1,9 @@ using System.Collections.Concurrent; using System.Diagnostics; using System.Text; -using ChatTwo.Code; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Game.Chat; using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; @@ -15,7 +15,7 @@ using Lumina.Text.Expressions; using Lumina.Text.Payloads; using Lumina.Text.ReadOnly; -namespace ChatTwo; +namespace HellionChat; internal class MessageManager : IAsyncDisposable { diff --git a/ChatTwo/MessageStore.cs b/HellionChat/MessageStore.cs similarity index 99% rename from ChatTwo/MessageStore.cs rename to HellionChat/MessageStore.cs index 988367a..0517cfc 100644 --- a/ChatTwo/MessageStore.cs +++ b/HellionChat/MessageStore.cs @@ -1,9 +1,9 @@ using System.Buffers; using System.Collections; using System.Data.Common; -using ChatTwo.Code; -using ChatTwo.Ui; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Ui; +using HellionChat.Util; using Dalamud.Game.Text.SeStringHandling; using MessagePack; using MessagePack.Formatters; @@ -13,7 +13,7 @@ using Microsoft.Data.Sqlite; using DalamudUtil = Dalamud.Utility.Util; using Encoding = System.Text.Encoding; -namespace ChatTwo; +namespace HellionChat; internal static class DbExtensions { diff --git a/ChatTwo/PayloadHandler.cs b/HellionChat/PayloadHandler.cs similarity index 99% rename from ChatTwo/PayloadHandler.cs rename to HellionChat/PayloadHandler.cs index 40a90e9..380c09a 100755 --- a/ChatTwo/PayloadHandler.cs +++ b/HellionChat/PayloadHandler.cs @@ -1,8 +1,8 @@ using System.Numerics; -using ChatTwo.Code; -using ChatTwo.Resources; -using ChatTwo.Ui; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Resources; +using HellionChat.Ui; +using HellionChat.Util; using Dalamud.Game.Addon.Lifecycle; using Dalamud.Game.Addon.Lifecycle.AddonArgTypes; using Dalamud.Game.ClientState.Objects.SubKinds; @@ -22,13 +22,13 @@ using Dalamud.Bindings.ImGui; using Lumina.Excel.Sheets; using Action = System.Action; using DalamudPartyFinderPayload = Dalamud.Game.Text.SeStringHandling.Payloads.PartyFinderPayload; -using ChatTwoPartyFinderPayload = ChatTwo.Util.PartyFinderPayload; +using ChatTwoPartyFinderPayload = HellionChat.Util.PartyFinderPayload; -namespace ChatTwo; +namespace HellionChat; public sealed class PayloadHandler { - private const string PopupId = "chat2-context-popup"; + private const string PopupId = "hellionchat-context-popup"; private ChatLogWindow LogWindow { get; } private (Chunk, Payload?)? Popup { get; set; } diff --git a/ChatTwo/Plugin.cs b/HellionChat/Plugin.cs similarity index 98% rename from ChatTwo/Plugin.cs rename to HellionChat/Plugin.cs index 161f48b..4aba746 100755 --- a/ChatTwo/Plugin.cs +++ b/HellionChat/Plugin.cs @@ -2,10 +2,10 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; -using ChatTwo.Ipc; -using ChatTwo.Resources; -using ChatTwo.Ui; -using ChatTwo.Util; +using HellionChat.Ipc; +using HellionChat.Resources; +using HellionChat.Ui; +using HellionChat.Util; using Dalamud.Game.ClientState.Conditions; using Dalamud.Interface.Windowing; using Dalamud.IoC; @@ -14,7 +14,7 @@ using Dalamud.Plugin.Services; using Dalamud.Bindings.ImGui; using Dalamud.Interface.ImGuiFileDialog; -namespace ChatTwo; +namespace HellionChat; // ReSharper disable once ClassNeverInstantiated.Global public sealed class Plugin : IDalamudPlugin @@ -94,6 +94,12 @@ public sealed class Plugin : IDalamudPlugin public Plugin() { + // Refuse to start if upstream Chat 2 is loaded — prevents IPC + // channel collisions and double-replacement of the in-game chat + // window. Throwing here makes Dalamud abort the load cleanly with + // our localized message instead of crashing FFXIV mid-frame. + ChatTwoConflictDetector.ThrowIfChatTwoIsLoaded(Interface); + try { GameStarted = Process.GetCurrentProcess().StartTime.ToUniversalTime(); diff --git a/ChatTwo/Privacy/PrivacyDefaults.cs b/HellionChat/Privacy/PrivacyDefaults.cs similarity index 98% rename from ChatTwo/Privacy/PrivacyDefaults.cs rename to HellionChat/Privacy/PrivacyDefaults.cs index 6e932ca..1ee9676 100644 --- a/ChatTwo/Privacy/PrivacyDefaults.cs +++ b/HellionChat/Privacy/PrivacyDefaults.cs @@ -1,6 +1,6 @@ -using ChatTwo.Code; +using HellionChat.Code; -namespace ChatTwo.Privacy; +namespace HellionChat.Privacy; internal static class PrivacyDefaults { diff --git a/HellionChat/Properties/AssemblyInfo.cs b/HellionChat/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e69de29 diff --git a/ChatTwo/Resources/ChatColourPresets.cs b/HellionChat/Resources/ChatColourPresets.cs similarity index 99% rename from ChatTwo/Resources/ChatColourPresets.cs rename to HellionChat/Resources/ChatColourPresets.cs index 78b454d..b424404 100644 --- a/ChatTwo/Resources/ChatColourPresets.cs +++ b/HellionChat/Resources/ChatColourPresets.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using ChatTwo.Code; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Util; -namespace ChatTwo.Resources; +namespace HellionChat.Resources; // Hellion Chat — v0.6.0 built-in colour presets for the ChatColours // settings section. Read-only static data; users apply a preset via the diff --git a/ChatTwo/Resources/HellionFont-OFL.txt b/HellionChat/Resources/HellionFont-OFL.txt similarity index 100% rename from ChatTwo/Resources/HellionFont-OFL.txt rename to HellionChat/Resources/HellionFont-OFL.txt diff --git a/ChatTwo/Resources/HellionFont.ttf b/HellionChat/Resources/HellionFont.ttf similarity index 100% rename from ChatTwo/Resources/HellionFont.ttf rename to HellionChat/Resources/HellionFont.ttf diff --git a/ChatTwo/Resources/HellionStrings.Designer.cs b/HellionChat/Resources/HellionStrings.Designer.cs similarity index 97% rename from ChatTwo/Resources/HellionStrings.Designer.cs rename to HellionChat/Resources/HellionStrings.Designer.cs index 18de8e1..5a4db83 100644 --- a/ChatTwo/Resources/HellionStrings.Designer.cs +++ b/HellionChat/Resources/HellionStrings.Designer.cs @@ -8,7 +8,7 @@ #nullable enable -namespace ChatTwo.Resources; +namespace HellionChat.Resources; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute] @@ -26,7 +26,7 @@ internal class HellionStrings get { if (resourceMan is null) - resourceMan = new global::System.Resources.ResourceManager("ChatTwo.Resources.HellionStrings", typeof(HellionStrings).Assembly); + resourceMan = new global::System.Resources.ResourceManager("HellionChat.Resources.HellionStrings", typeof(HellionStrings).Assembly); return resourceMan; } } @@ -270,4 +270,9 @@ internal class HellionStrings internal static string Hint_v061_PopOutHeader_Body => Get(nameof(Hint_v061_PopOutHeader_Body)); internal static string Hint_v061_PopOutHeader_Ack => Get(nameof(Hint_v061_PopOutHeader_Ack)); internal static string Hint_v061_PopOutHeader_OpenSettings => Get(nameof(Hint_v061_PopOutHeader_OpenSettings)); + + // Hellion Chat — v1.0.0 Chat 2 parallel-load conflict detection + internal static string ChatTwoConflictTitle => Get(nameof(ChatTwoConflictTitle)); + internal static string ChatTwoConflictBody => Get(nameof(ChatTwoConflictBody)); + internal static string ChatTwoConflictAction => Get(nameof(ChatTwoConflictAction)); } diff --git a/ChatTwo/Resources/HellionStrings.de.resx b/HellionChat/Resources/HellionStrings.de.resx similarity index 97% rename from ChatTwo/Resources/HellionStrings.de.resx rename to HellionChat/Resources/HellionStrings.de.resx index 5002f28..177116d 100644 --- a/ChatTwo/Resources/HellionStrings.de.resx +++ b/HellionChat/Resources/HellionStrings.de.resx @@ -19,7 +19,7 @@ Datenschutz-Filter aktivieren - Wenn aktiviert, werden nur Nachrichten aus den erlaubten Kanälen in die Datenbank gespeichert. Beim Deaktivieren gilt wieder das Standard-Verhalten von ChatTwo, also alles außer Battle-Logs wird gespeichert. + Wenn aktiviert, werden nur Nachrichten aus den erlaubten Kanälen in die Datenbank gespeichert. Beim Deaktivieren gilt wieder das Standardverhalten, also alles außer Battle-Logs wird gespeichert. Der Filter steuert nur, was in die lokale Datenbank geschrieben wird. Im Chat-Log siehst du weiterhin jede Nachricht live, ausgeschlossene Kanäle werden nur nicht mehr gespeichert. Wenn du Kanäle auch aus der sichtbaren Anzeige entfernen willst, nutze die normalen Chat-Tab-Filter im Spiel. @@ -211,7 +211,7 @@ Volle Historie - Deaktiviert den Datenschutz-Filter komplett. Speichert alles außer Battle-Logs, wie das Original-Chat 2. Aufbewahrung ist AUS, die Historie wächst dauerhaft. + Deaktiviert den Datenschutz-Filter komplett. Speichert alles außer Battle-Logs (das ursprüngliche Voll-Historie-Verhalten). Aufbewahrung ist AUS, die Historie wächst dauerhaft. DSGVO-Hinweis: Wenn du Nachrichten Dritter (Sagen/Schreien/Rufen fremder Spieler, NPC-Dialoge mit Spielernamen usw.) zeitlich unbegrenzt speicherst, kann das die Ausnahme für rein persönliche oder familiäre Tätigkeiten (Art. 2 Abs. 2 Buchst. c) sprengen. Nutze dieses Profil nur, wenn du einen klaren Grund hast, das volle Archiv zu behalten. @@ -562,7 +562,7 @@ Wenn du mehrere Linkshells benutzt, empfiehlt der Maintainer einen Tab pro Shell für eine sauberere Übersicht. Tab duplizieren und je Kopie die Kanalauswahl einschränken. - ChatTwo Standard + Klassik (Chat 2 Default) Hoher Kontrast @@ -609,4 +609,13 @@ Einstellungen öffnen + + Hellion Chat kann nicht starten, solange Chat 2 geladen ist. + + + Hellion Chat ist ein eigenständiger Fork von Chat 2. Beide Plugins ersetzen dasselbe Chat-Fenster im Spiel und würden zur Laufzeit kollidieren. + + + Chat 2 in /xlplugins deaktivieren, danach Hellion Chat erneut aktivieren. + diff --git a/ChatTwo/Resources/HellionStrings.resx b/HellionChat/Resources/HellionStrings.resx similarity index 97% rename from ChatTwo/Resources/HellionStrings.resx rename to HellionChat/Resources/HellionStrings.resx index 8006988..c6c9703 100644 --- a/ChatTwo/Resources/HellionStrings.resx +++ b/HellionChat/Resources/HellionStrings.resx @@ -19,7 +19,7 @@ Enable privacy filter - When enabled, only messages from whitelisted channels are persisted to the database. Disabling restores upstream ChatTwo behavior (everything except battle messages is stored). + When enabled, only messages from whitelisted channels are persisted to the database. Disabling restores the original behavior (everything except battle messages is stored). The filter only controls what is written to the local database. The chat log itself keeps showing every message live, disallowed channels just stop being saved. Use the channel hide options in your in-game chat tabs if you want to remove channels from the visible chat. @@ -211,7 +211,7 @@ Full History - Disables the privacy filter entirely. Stores everything except battle logs, just like upstream Chat 2. Retention is OFF, history grows forever. + Disables the privacy filter entirely. Stores everything except battle logs (the original full-history behavior). Retention is OFF, history grows forever. GDPR notice: storing third-party messages (Say/Shout/Yell of strangers, NPC dialogue with player names, etc.) for an unlimited time may exceed the personal/household exemption (Art. 2(2)(c)). Use this profile only if you have a clear reason to keep the full archive. @@ -562,7 +562,7 @@ If you use multiple linkshells, the maintainer recommends one tab per shell for cleaner readability. Duplicate this tab and narrow the channel selection per copy. - ChatTwo Default + Klassik (Chat 2 Default) High-Contrast @@ -609,4 +609,13 @@ Open Settings + + Hellion Chat cannot start while Chat 2 is loaded. + + + Hellion Chat is a standalone fork of Chat 2. Both plugins replace the same in-game chat window and would conflict at runtime if loaded together. + + + Disable Chat 2 in /xlplugins, then re-enable Hellion Chat. + diff --git a/ChatTwo/Resources/Language.Designer.cs b/HellionChat/Resources/Language.Designer.cs similarity index 99% rename from ChatTwo/Resources/Language.Designer.cs rename to HellionChat/Resources/Language.Designer.cs index 4601203..e40d551 100755 --- a/ChatTwo/Resources/Language.Designer.cs +++ b/HellionChat/Resources/Language.Designer.cs @@ -7,7 +7,7 @@ // //------------------------------------------------------------------------------ -namespace ChatTwo.Resources { +namespace HellionChat.Resources { using System; @@ -38,7 +38,7 @@ namespace ChatTwo.Resources { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ChatTwo.Resources.Language", typeof(Language).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HellionChat.Resources.Language", typeof(Language).Assembly); resourceMan = temp; } return resourceMan; diff --git a/ChatTwo/Resources/Language.ca.resx b/HellionChat/Resources/Language.ca.resx similarity index 100% rename from ChatTwo/Resources/Language.ca.resx rename to HellionChat/Resources/Language.ca.resx diff --git a/ChatTwo/Resources/Language.de.resx b/HellionChat/Resources/Language.de.resx similarity index 100% rename from ChatTwo/Resources/Language.de.resx rename to HellionChat/Resources/Language.de.resx diff --git a/ChatTwo/Resources/Language.es.resx b/HellionChat/Resources/Language.es.resx similarity index 100% rename from ChatTwo/Resources/Language.es.resx rename to HellionChat/Resources/Language.es.resx diff --git a/ChatTwo/Resources/Language.fr.resx b/HellionChat/Resources/Language.fr.resx similarity index 100% rename from ChatTwo/Resources/Language.fr.resx rename to HellionChat/Resources/Language.fr.resx diff --git a/ChatTwo/Resources/Language.it.resx b/HellionChat/Resources/Language.it.resx similarity index 100% rename from ChatTwo/Resources/Language.it.resx rename to HellionChat/Resources/Language.it.resx diff --git a/ChatTwo/Resources/Language.ja.resx b/HellionChat/Resources/Language.ja.resx similarity index 100% rename from ChatTwo/Resources/Language.ja.resx rename to HellionChat/Resources/Language.ja.resx diff --git a/ChatTwo/Resources/Language.ko.resx b/HellionChat/Resources/Language.ko.resx similarity index 100% rename from ChatTwo/Resources/Language.ko.resx rename to HellionChat/Resources/Language.ko.resx diff --git a/ChatTwo/Resources/Language.nl.resx b/HellionChat/Resources/Language.nl.resx similarity index 100% rename from ChatTwo/Resources/Language.nl.resx rename to HellionChat/Resources/Language.nl.resx diff --git a/ChatTwo/Resources/Language.pt-BR.resx b/HellionChat/Resources/Language.pt-BR.resx similarity index 100% rename from ChatTwo/Resources/Language.pt-BR.resx rename to HellionChat/Resources/Language.pt-BR.resx diff --git a/ChatTwo/Resources/Language.resx b/HellionChat/Resources/Language.resx similarity index 100% rename from ChatTwo/Resources/Language.resx rename to HellionChat/Resources/Language.resx diff --git a/ChatTwo/Resources/Language.ro.resx b/HellionChat/Resources/Language.ro.resx similarity index 100% rename from ChatTwo/Resources/Language.ro.resx rename to HellionChat/Resources/Language.ro.resx diff --git a/ChatTwo/Resources/Language.ru.resx b/HellionChat/Resources/Language.ru.resx similarity index 100% rename from ChatTwo/Resources/Language.ru.resx rename to HellionChat/Resources/Language.ru.resx diff --git a/ChatTwo/Resources/Language.sv.resx b/HellionChat/Resources/Language.sv.resx similarity index 100% rename from ChatTwo/Resources/Language.sv.resx rename to HellionChat/Resources/Language.sv.resx diff --git a/ChatTwo/Resources/Language.zh-Hans.resx b/HellionChat/Resources/Language.zh-Hans.resx similarity index 99% rename from ChatTwo/Resources/Language.zh-Hans.resx rename to HellionChat/Resources/Language.zh-Hans.resx index 1ccc180..ee716eb 100644 --- a/ChatTwo/Resources/Language.zh-Hans.resx +++ b/HellionChat/Resources/Language.zh-Hans.resx @@ -1364,7 +1364,7 @@ 启动 - 网页界面已停止。 + 网页界面已启动。 网页界面启动失败。检查 /xllog 获取更多信息。 diff --git a/ChatTwo/Resources/Language.zh-Hant.resx b/HellionChat/Resources/Language.zh-Hant.resx similarity index 100% rename from ChatTwo/Resources/Language.zh-Hant.resx rename to HellionChat/Resources/Language.zh-Hant.resx diff --git a/ChatTwo/Sheets.cs b/HellionChat/Sheets.cs similarity index 93% rename from ChatTwo/Sheets.cs rename to HellionChat/Sheets.cs index 80eb1e3..c65394e 100644 --- a/ChatTwo/Sheets.cs +++ b/HellionChat/Sheets.cs @@ -2,7 +2,7 @@ using Lumina.Excel; using Lumina.Excel.Sheets; -namespace ChatTwo; +namespace HellionChat; public static class Sheets { @@ -37,7 +37,7 @@ public static class Sheets public static IEnumerable WorldsOnDatacenter(IPlayerCharacter character) { - var dcRow = character.HomeWorld.Value.DataCenter.Value.Region.RowId; - return WorldSheet.Where(world => world.IsPublic && world.DataCenter.Value.Region.RowId == dcRow); + var dcRow = character.HomeWorld.Value.DataCenter.RowId; + return WorldSheet.Where(world => world.IsPublic && world.DataCenter.RowId == dcRow); } } \ No newline at end of file diff --git a/ChatTwo/Ui/AutoCompleteInfo.cs b/HellionChat/Ui/AutoCompleteInfo.cs similarity index 92% rename from ChatTwo/Ui/AutoCompleteInfo.cs rename to HellionChat/Ui/AutoCompleteInfo.cs index 230d6ed..2d7418c 100755 --- a/ChatTwo/Ui/AutoCompleteInfo.cs +++ b/HellionChat/Ui/AutoCompleteInfo.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.Ui; +namespace HellionChat.Ui; internal class AutoCompleteInfo { diff --git a/ChatTwo/Ui/ChatInputBar.cs b/HellionChat/Ui/ChatInputBar.cs similarity index 99% rename from ChatTwo/Ui/ChatInputBar.cs rename to HellionChat/Ui/ChatInputBar.cs index 0a8541d..b2319ea 100644 --- a/ChatTwo/Ui/ChatInputBar.cs +++ b/HellionChat/Ui/ChatInputBar.cs @@ -1,11 +1,11 @@ using System; using System.Numerics; -using ChatTwo.Code; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Util; using Dalamud.Bindings.ImGui; using Dalamud.Interface.Utility.Raii; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; // Hellion Chat — v0.6.0 input bar component for pop-out windows. // diff --git a/ChatTwo/Ui/ChatLogWindow.cs b/HellionChat/Ui/ChatLogWindow.cs similarity index 99% rename from ChatTwo/Ui/ChatLogWindow.cs rename to HellionChat/Ui/ChatLogWindow.cs index 9a23fc6..fe7e201 100644 --- a/ChatTwo/Ui/ChatLogWindow.cs +++ b/HellionChat/Ui/ChatLogWindow.cs @@ -3,11 +3,11 @@ using System.Globalization; using System.Numerics; using System.Runtime.InteropServices; using System.Text; -using ChatTwo.Code; -using ChatTwo.GameFunctions; -using ChatTwo.GameFunctions.Types; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.GameFunctions; +using HellionChat.GameFunctions.Types; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Game.Addon.Lifecycle; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; @@ -22,7 +22,7 @@ using Dalamud.Bindings.ImGui; using Lumina.Excel.Sheets; using Lumina.Extensions; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; public sealed class ChatLogWindow : Window { diff --git a/ChatTwo/Ui/CommandHelpWindow.cs b/HellionChat/Ui/CommandHelpWindow.cs similarity index 97% rename from ChatTwo/Ui/CommandHelpWindow.cs rename to HellionChat/Ui/CommandHelpWindow.cs index 16d5bdd..00e6fb8 100644 --- a/ChatTwo/Ui/CommandHelpWindow.cs +++ b/HellionChat/Ui/CommandHelpWindow.cs @@ -1,12 +1,12 @@ using System.Numerics; -using ChatTwo.Util; +using HellionChat.Util; using Dalamud.Interface.Utility; using Dalamud.Interface.Windowing; using Dalamud.Utility; using Dalamud.Bindings.ImGui; using Lumina.Text.ReadOnly; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; public class CommandHelpWindow : Window { private ChatLogWindow LogWindow { get; } diff --git a/ChatTwo/Ui/DbViewer.cs b/HellionChat/Ui/DbViewer.cs similarity index 97% rename from ChatTwo/Ui/DbViewer.cs rename to HellionChat/Ui/DbViewer.cs index 4a8e512..e766ca7 100644 --- a/ChatTwo/Ui/DbViewer.cs +++ b/HellionChat/Ui/DbViewer.cs @@ -2,9 +2,9 @@ using System.Globalization; using System.Numerics; using System.Text; -using ChatTwo.Code; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; @@ -18,7 +18,7 @@ using Lumina.Data.Files; using Lumina.Text.ReadOnly; using MoreLinq; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; public class DbViewer : Window { @@ -391,6 +391,10 @@ public class DbViewer : Window await rangeMessageEnumerator.DisposeAsync(); var filteredHistory = Filter(messageHistory); + // Materialize Count once — re-enumerating the IEnumerable on + // every batch (twice per batch in the Notification update) + // turned the export into an O(N²) hot loop on large histories. + var totalCount = filteredHistory.Count; var sb = new StringBuilder(); await using var stream = new StreamWriter(Path.Join(InputPath, $"Chat2_{DateTime.Now:yyyy_dd_M__HH_mm_ss}.txt")); @@ -416,8 +420,8 @@ public class DbViewer : Window } }, delayTicks: 5); - Notification.Progress = (float)batch / filteredHistory.Count; - Notification.Content = $"Exported {batch} of {filteredHistory.Count} messages"; + Notification.Progress = (float)batch / totalCount; + Notification.Content = $"Exported {batch} of {totalCount} messages"; await stream.WriteAsync(sb.ToString()); sb.Clear(); } diff --git a/ChatTwo/Ui/Debugger.cs b/HellionChat/Ui/Debugger.cs similarity index 96% rename from ChatTwo/Ui/Debugger.cs rename to HellionChat/Ui/Debugger.cs index fdbb68e..ffeeee6 100644 --- a/ChatTwo/Ui/Debugger.cs +++ b/HellionChat/Ui/Debugger.cs @@ -1,5 +1,5 @@ using System.Numerics; -using ChatTwo.Code; +using HellionChat.Code; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; using Dalamud.Interface.Windowing; @@ -7,9 +7,9 @@ using FFXIVClientStructs.FFXIV.Client.UI.Agent; using Dalamud.Bindings.ImGui; using Lumina.Text.ReadOnly; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; -public class DebuggerWindow : Window +public class DebuggerWindow : Window, IDisposable { private readonly Plugin Plugin; private readonly ChatLogWindow ChatLogWindow; diff --git a/ChatTwo/Ui/FirstRunWizard.cs b/HellionChat/Ui/FirstRunWizard.cs similarity index 97% rename from ChatTwo/Ui/FirstRunWizard.cs rename to HellionChat/Ui/FirstRunWizard.cs index 99928e7..324cea0 100644 --- a/ChatTwo/Ui/FirstRunWizard.cs +++ b/HellionChat/Ui/FirstRunWizard.cs @@ -1,13 +1,13 @@ using System.Numerics; -using ChatTwo.Code; -using ChatTwo.Privacy; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Privacy; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; public sealed class FirstRunWizard : Window { diff --git a/ChatTwo/Ui/HellionStyle.cs b/HellionChat/Ui/HellionStyle.cs similarity index 99% rename from ChatTwo/Ui/HellionStyle.cs rename to HellionChat/Ui/HellionStyle.cs index d5b8281..026c464 100644 --- a/ChatTwo/Ui/HellionStyle.cs +++ b/HellionChat/Ui/HellionStyle.cs @@ -1,8 +1,8 @@ -using ChatTwo.Util; +using HellionChat.Util; using Dalamud.Bindings.ImGui; using Dalamud.Interface.Utility.Raii; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; /// /// ImGui style override for Hellion Chat. Industrial HUD palette with three diff --git a/ChatTwo/Ui/InputPreview.cs b/HellionChat/Ui/InputPreview.cs similarity index 98% rename from ChatTwo/Ui/InputPreview.cs rename to HellionChat/Ui/InputPreview.cs index bc99be6..8e7589b 100644 --- a/ChatTwo/Ui/InputPreview.cs +++ b/HellionChat/Ui/InputPreview.cs @@ -1,9 +1,9 @@ using System.Numerics; using System.Text; using System.Text.RegularExpressions; -using ChatTwo.Code; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; @@ -12,7 +12,7 @@ using Dalamud.Interface.Windowing; using Dalamud.Plugin.Services; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; public partial class InputPreview : Window { diff --git a/ChatTwo/Ui/Popout.cs b/HellionChat/Ui/Popout.cs similarity index 94% rename from ChatTwo/Ui/Popout.cs rename to HellionChat/Ui/Popout.cs index 3d8de1b..a2f34f8 100644 --- a/ChatTwo/Ui/Popout.cs +++ b/HellionChat/Ui/Popout.cs @@ -4,7 +4,7 @@ using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; internal class Popout : Window { @@ -80,7 +80,10 @@ internal class Popout : Window if (!Tab.CanResize) Flags |= ImGuiWindowFlags.NoResize; - if (!ChatLogWindow.PopOutDocked[Idx]) + // Idx may point past the end if PopOutDocked was resized (e.g., a tab + // dropped) between the AddPopOutsToDraw() snapshot and this frame. + // Guard the read so we don't index into stale state. + if (Idx >= 0 && Idx < ChatLogWindow.PopOutDocked.Count && !ChatLogWindow.PopOutDocked[Idx]) { if (Tab.IndependentOpacity) { @@ -195,7 +198,8 @@ internal class Popout : Window public override void PostDraw() { - ChatLogWindow.PopOutDocked[Idx] = ImGui.IsWindowDocked(); + if (Idx >= 0 && Idx < ChatLogWindow.PopOutDocked.Count) + ChatLogWindow.PopOutDocked[Idx] = ImGui.IsWindowDocked(); if (Plugin.Config is { OverrideStyle: true, ChosenStyle: not null }) StyleModel.GetConfiguredStyles()?.FirstOrDefault(style => style.Name == Plugin.Config.ChosenStyle)?.Pop(); diff --git a/ChatTwo/Ui/SeStringDebugger.cs b/HellionChat/Ui/SeStringDebugger.cs similarity index 99% rename from ChatTwo/Ui/SeStringDebugger.cs rename to HellionChat/Ui/SeStringDebugger.cs index a4d7465..36d2d1d 100644 --- a/ChatTwo/Ui/SeStringDebugger.cs +++ b/HellionChat/Ui/SeStringDebugger.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Numerics; using System.Text; -using ChatTwo.Util; +using HellionChat.Util; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Interface.Utility.Raii; @@ -10,7 +10,7 @@ using Dalamud.Bindings.ImGui; using Dalamud.Utility; using DalamudPartyFinderPayload = Dalamud.Game.Text.SeStringHandling.Payloads.PartyFinderPayload; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; public class SeStringDebugger : Window { diff --git a/ChatTwo/Ui/Settings.cs b/HellionChat/Ui/Settings.cs similarity index 98% rename from ChatTwo/Ui/Settings.cs rename to HellionChat/Ui/Settings.cs index 41b70c9..6abf6a6 100755 --- a/ChatTwo/Ui/Settings.cs +++ b/HellionChat/Ui/Settings.cs @@ -1,13 +1,13 @@ using System.Numerics; -using ChatTwo.Resources; -using ChatTwo.Ui.SettingsTabs; -using ChatTwo.Util; +using HellionChat.Resources; +using HellionChat.Ui.SettingsTabs; +using HellionChat.Util; using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; using Dalamud.Utility; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui; +namespace HellionChat.Ui; public sealed class SettingsWindow : Dalamud.Interface.Windowing.Window { diff --git a/ChatTwo/Ui/SettingsTabs/Appearance.cs b/HellionChat/Ui/SettingsTabs/Appearance.cs similarity index 99% rename from ChatTwo/Ui/SettingsTabs/Appearance.cs rename to HellionChat/Ui/SettingsTabs/Appearance.cs index 3f061c9..63eabaf 100644 --- a/ChatTwo/Ui/SettingsTabs/Appearance.cs +++ b/HellionChat/Ui/SettingsTabs/Appearance.cs @@ -1,6 +1,6 @@ -using ChatTwo.Code; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud; using Dalamud.Interface; using Dalamud.Interface.FontIdentifier; @@ -9,7 +9,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui.SettingsTabs; +namespace HellionChat.Ui.SettingsTabs; internal sealed class Appearance : ISettingsTab { diff --git a/ChatTwo/Ui/SettingsTabs/Chat.cs b/HellionChat/Ui/SettingsTabs/Chat.cs similarity index 94% rename from ChatTwo/Ui/SettingsTabs/Chat.cs rename to HellionChat/Ui/SettingsTabs/Chat.cs index 86074bf..be246b0 100644 --- a/ChatTwo/Ui/SettingsTabs/Chat.cs +++ b/HellionChat/Ui/SettingsTabs/Chat.cs @@ -1,13 +1,13 @@ using System.Numerics; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui.SettingsTabs; +namespace HellionChat.Ui.SettingsTabs; // Chat-Tab — vier eigenständige Sektionen: Auto-Tell-Tabs, Behaviour, // Preview, Emotes. Der Emotes-Block ist 1:1 aus der Bestand-Datei @@ -169,6 +169,13 @@ internal sealed class Chat : ISettingsTab using (Plugin.FontManager.FontAwesome.Push()) ImGui.Button(FontAwesomeIcon.Plus.ToIconString(), new Vector2(buttonWidth, 0)); + // Open the selector popup on left-click; SelectorPopup uses + // ImRaii.ContextPopupItem internally which only opens on right- + // click otherwise — without this OpenPopup the button looked + // active but the popup never appeared on a normal click. + if (ImGui.IsItemClicked()) + ImGui.OpenPopup("WordAddPopup"); + if (SearchSelector.SelectorPopup("WordAddPopup", out var newWord, WordPopupOptions)) { Mutable.BlockedEmotes.Add(newWord); diff --git a/ChatTwo/Ui/SettingsTabs/Database.cs b/HellionChat/Ui/SettingsTabs/Database.cs similarity index 98% rename from ChatTwo/Ui/SettingsTabs/Database.cs rename to HellionChat/Ui/SettingsTabs/Database.cs index 46e6b12..0295456 100755 --- a/ChatTwo/Ui/SettingsTabs/Database.cs +++ b/HellionChat/Ui/SettingsTabs/Database.cs @@ -1,7 +1,7 @@ using System.Diagnostics; -using ChatTwo.Code; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Interface.ImGuiNotification; @@ -9,7 +9,7 @@ using Dalamud.Interface.Utility.Raii; using Dalamud.Bindings.ImGui; using Dalamud.Game.Text; -namespace ChatTwo.Ui.SettingsTabs; +namespace HellionChat.Ui.SettingsTabs; internal sealed class Database : ISettingsTab { diff --git a/ChatTwo/Ui/SettingsTabs/General.cs b/HellionChat/Ui/SettingsTabs/General.cs similarity index 98% rename from ChatTwo/Ui/SettingsTabs/General.cs rename to HellionChat/Ui/SettingsTabs/General.cs index 2202243..663a6b9 100644 --- a/ChatTwo/Ui/SettingsTabs/General.cs +++ b/HellionChat/Ui/SettingsTabs/General.cs @@ -1,10 +1,10 @@ -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui.SettingsTabs; +namespace HellionChat.Ui.SettingsTabs; internal sealed class General : ISettingsTab { diff --git a/ChatTwo/Ui/SettingsTabs/ISettingsTab.cs b/HellionChat/Ui/SettingsTabs/ISettingsTab.cs similarity index 70% rename from ChatTwo/Ui/SettingsTabs/ISettingsTab.cs rename to HellionChat/Ui/SettingsTabs/ISettingsTab.cs index 16befd2..ce99fea 100755 --- a/ChatTwo/Ui/SettingsTabs/ISettingsTab.cs +++ b/HellionChat/Ui/SettingsTabs/ISettingsTab.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.Ui.SettingsTabs; +namespace HellionChat.Ui.SettingsTabs; internal interface ISettingsTab { diff --git a/ChatTwo/Ui/SettingsTabs/Information.cs b/HellionChat/Ui/SettingsTabs/Information.cs similarity index 98% rename from ChatTwo/Ui/SettingsTabs/Information.cs rename to HellionChat/Ui/SettingsTabs/Information.cs index 38667fb..c1c0096 100644 --- a/ChatTwo/Ui/SettingsTabs/Information.cs +++ b/HellionChat/Ui/SettingsTabs/Information.cs @@ -1,12 +1,12 @@ -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui.SettingsTabs; +namespace HellionChat.Ui.SettingsTabs; // Information-Tab vereint die früheren About- und Changelog-Tabs in // drei kollabierbaren Sektionen. Der About-Inhalt ist 1:1 aus About.cs diff --git a/ChatTwo/Ui/SettingsTabs/Privacy.cs b/HellionChat/Ui/SettingsTabs/Privacy.cs similarity index 95% rename from ChatTwo/Ui/SettingsTabs/Privacy.cs rename to HellionChat/Ui/SettingsTabs/Privacy.cs index 6126230..4a0f2c0 100644 --- a/ChatTwo/Ui/SettingsTabs/Privacy.cs +++ b/HellionChat/Ui/SettingsTabs/Privacy.cs @@ -1,15 +1,15 @@ -using ChatTwo.Code; -using ChatTwo.Export; -using ChatTwo.Privacy; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Export; +using HellionChat.Privacy; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Interface.Colors; using Dalamud.Interface.ImGuiNotification; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui.SettingsTabs; +namespace HellionChat.Ui.SettingsTabs; internal sealed class Privacy : ISettingsTab { @@ -455,11 +455,18 @@ internal sealed class Privacy : ISettingsTab if (deleted > 0) { - Plugin.Framework.Run(() => + // Bound the wait so a hung framework tick can't deadlock + // the background retention worker. Five seconds is well + // beyond a normal frame; if we time out we log and let + // the next FilterAllTabsAsync call recover the state. + if (!Plugin.Framework.Run(() => + { + Plugin.MessageManager.ClearAllTabs(); + Plugin.MessageManager.FilterAllTabsAsync(); + }).Wait(TimeSpan.FromSeconds(5))) { - Plugin.MessageManager.ClearAllTabs(); - Plugin.MessageManager.FilterAllTabsAsync(); - }).Wait(); + Plugin.Log.Warning("Retention sweep: framework refresh timed out after 5s."); + } } WrapperUtil.AddNotification(string.Format(HellionStrings.Retention_Success, deleted), NotificationType.Success); @@ -615,11 +622,17 @@ internal sealed class Privacy : ISettingsTab var deleted = Plugin.MessageManager.Store.CleanupRetainOnly(allowed); Plugin.Log.Information($"Privacy cleanup: deleted {deleted} messages"); - Plugin.Framework.Run(() => + // Bound the wait so a hung framework tick can't deadlock + // the background cleanup worker. See the matching comment in + // the retention path above for rationale. + if (!Plugin.Framework.Run(() => + { + Plugin.MessageManager.ClearAllTabs(); + Plugin.MessageManager.FilterAllTabsAsync(); + }).Wait(TimeSpan.FromSeconds(5))) { - Plugin.MessageManager.ClearAllTabs(); - Plugin.MessageManager.FilterAllTabsAsync(); - }).Wait(); + Plugin.Log.Warning("Privacy cleanup: framework refresh timed out after 5s."); + } WrapperUtil.AddNotification(string.Format(HellionStrings.Cleanup_Success, deleted), NotificationType.Success); } diff --git a/ChatTwo/Ui/SettingsTabs/Tabs.cs b/HellionChat/Ui/SettingsTabs/Tabs.cs similarity index 82% rename from ChatTwo/Ui/SettingsTabs/Tabs.cs rename to HellionChat/Ui/SettingsTabs/Tabs.cs index 1f4b7ee..8ad2bb0 100755 --- a/ChatTwo/Ui/SettingsTabs/Tabs.cs +++ b/HellionChat/Ui/SettingsTabs/Tabs.cs @@ -1,12 +1,12 @@ -using ChatTwo.Code; -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Code; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Interface; using Dalamud.Interface.Utility.Raii; using Dalamud.Bindings.ImGui; using Dalamud.Game.ClientState.Objects.SubKinds; -namespace ChatTwo.Ui.SettingsTabs; +namespace HellionChat.Ui.SettingsTabs; internal sealed class Tabs : ISettingsTab { @@ -181,28 +181,39 @@ internal sealed class Tabs : ISettingsTab ImGui.SameLine(); - var selectedWorld = worlds.FindIndex(world => world.RowId == tab.TellTarget.World); - if (selectedWorld == -1) - selectedWorld = 0; - - using (var combo = ImRaii.Combo("###player-world", worlds[selectedWorld].Name.ToString())) + // Guard against an empty worlds list — can happen briefly + // when switching characters or if the datacenter sheet + // has not yet populated. Without the guard the indexed + // access into worlds[selectedWorld] would crash. + if (worlds.Count == 0) { - if (combo.Success) + ImGui.TextDisabled("(no worlds available)"); + } + else + { + var selectedWorld = worlds.FindIndex(world => world.RowId == tab.TellTarget.World); + if (selectedWorld == -1) + selectedWorld = 0; + + using (var combo = ImRaii.Combo("###player-world", worlds[selectedWorld].Name.ToString())) { - var lastDc = worlds.First().DataCenter.RowId; - foreach (var (idx, world) in worlds.Index()) + if (combo.Success) { - if (ImGui.Selectable(world.Name.ToString(), selectedWorld == idx)) + var lastDc = worlds.First().DataCenter.RowId; + foreach (var (idx, world) in worlds.Index()) { - selectedWorld = idx; - tab.TellTarget.World = worlds[selectedWorld].RowId; + if (ImGui.Selectable(world.Name.ToString(), selectedWorld == idx)) + { + selectedWorld = idx; + tab.TellTarget.World = worlds[selectedWorld].RowId; + } + + if (lastDc == world.DataCenter.RowId) + continue; + + lastDc = world.DataCenter.RowId; + ImGui.Separator(); } - - if (lastDc == world.DataCenter.RowId) - continue; - - lastDc = world.DataCenter.RowId; - ImGui.Separator(); } } } diff --git a/ChatTwo/Ui/SettingsTabs/Window.cs b/HellionChat/Ui/SettingsTabs/Window.cs similarity index 98% rename from ChatTwo/Ui/SettingsTabs/Window.cs rename to HellionChat/Ui/SettingsTabs/Window.cs index f2e2638..8d42587 100644 --- a/ChatTwo/Ui/SettingsTabs/Window.cs +++ b/HellionChat/Ui/SettingsTabs/Window.cs @@ -1,9 +1,9 @@ -using ChatTwo.Resources; -using ChatTwo.Util; +using HellionChat.Resources; +using HellionChat.Util; using Dalamud.Interface.Utility.Raii; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Ui.SettingsTabs; +namespace HellionChat.Ui.SettingsTabs; internal sealed class Window : ISettingsTab { diff --git a/ChatTwo/Util/AutoTranslate.cs b/HellionChat/Util/AutoTranslate.cs similarity index 90% rename from ChatTwo/Util/AutoTranslate.cs rename to HellionChat/Util/AutoTranslate.cs index 32fc37e..d3532d1 100644 --- a/ChatTwo/Util/AutoTranslate.cs +++ b/HellionChat/Util/AutoTranslate.cs @@ -12,13 +12,19 @@ using Pidgin; using static Pidgin.Parser; using static Pidgin.Parser; -namespace ChatTwo.Util; +namespace HellionChat.Util; internal static class AutoTranslate { private static readonly Dictionary> Entries = new(); private static readonly HashSet<(uint, uint)> ValidEntries = []; + // Serializes all reads and writes against Entries / ValidEntries. + // PreloadCache spawns a worker thread that fills both, while the main + // thread reads them via Matching / ReplaceWithPayload / StartsWithCommand + // — without this lock the HashSet/Dictionary access is undefined. + private static readonly object EntriesLock = new(); + private static Parser> selector)> Parser() { var sheetName = Any @@ -68,9 +74,17 @@ internal static class AutoTranslate private static List AllEntries() { - if (Entries.TryGetValue(Plugin.DataManager.Language, out var entries)) - return entries; + lock (EntriesLock) + { + if (Entries.TryGetValue(Plugin.DataManager.Language, out var entries)) + return entries; + return BuildEntriesLocked(); + } + } + + private static List BuildEntriesLocked() + { var shouldAdd = ValidEntries.Count == 0; var parser = Parser(); @@ -229,7 +243,10 @@ internal static class AutoTranslate return; // populate the list of valid entries - if (ValidEntries.Count == 0) + bool needBuild; + lock (EntriesLock) + needBuild = ValidEntries.Count == 0; + if (needBuild) AllEntries(); var start = -1; @@ -244,7 +261,10 @@ internal static class AutoTranslate var parts = tag[4..^1].Split(',', 2); if (parts.Length == 2 && uint.TryParse(parts[0], out var group) && uint.TryParse(parts[1], out var key)) { - var payload = ValidEntries.Contains((group, key)) ? CreateFixedTranslation(group, key) : []; + bool isValid; + lock (EntriesLock) + isValid = ValidEntries.Contains((group, key)); + var payload = isValid ? CreateFixedTranslation(group, key) : []; var oldBytes = bytes.ToArray(); var lengthDiff = payload.Length - (i - start); @@ -271,7 +291,10 @@ internal static class AutoTranslate return false; // populate the list of valid entries - if (ValidEntries.Count == 0) + bool needBuild; + lock (EntriesLock) + needBuild = ValidEntries.Count == 0; + if (needBuild) AllEntries(); for (var i = 0; i < search.Length; i++) @@ -289,7 +312,10 @@ internal static class AutoTranslate var parts = tag[4..^1].Split(',', 2); if (parts.Length == 2 && uint.TryParse(parts[0], out var group) && uint.TryParse(parts[1], out var key)) { - if (!ValidEntries.Contains((group, key))) + bool isValid; + lock (EntriesLock) + isValid = ValidEntries.Contains((group, key)); + if (!isValid) return false; var evaluated = Plugin.Evaluator.Evaluate(new ReadOnlySeString(CreateFixedTranslation(group, key))).ToString(); diff --git a/ChatTwo/Util/ChunkUtil.cs b/HellionChat/Util/ChunkUtil.cs similarity index 99% rename from ChatTwo/Util/ChunkUtil.cs rename to HellionChat/Util/ChunkUtil.cs index 8077ac7..c6fd93e 100755 --- a/ChatTwo/Util/ChunkUtil.cs +++ b/HellionChat/Util/ChunkUtil.cs @@ -1,4 +1,4 @@ -using ChatTwo.Code; +using HellionChat.Code; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using System.Text; @@ -6,7 +6,7 @@ using Lumina.Text.Payloads; using PayloadType = Dalamud.Game.Text.SeStringHandling.PayloadType; -namespace ChatTwo.Util; +namespace HellionChat.Util; internal static class ChunkUtil { diff --git a/ChatTwo/Util/ColourUtil.cs b/HellionChat/Util/ColourUtil.cs similarity index 98% rename from ChatTwo/Util/ColourUtil.cs rename to HellionChat/Util/ColourUtil.cs index 622bde0..d74e2f4 100755 --- a/ChatTwo/Util/ColourUtil.cs +++ b/HellionChat/Util/ColourUtil.cs @@ -1,7 +1,7 @@ using System.Buffers.Binary; using System.Numerics; -namespace ChatTwo.Util; +namespace HellionChat.Util; internal static class ColourUtil { private static (byte r, byte g, byte b) RgbaToRgbComponents(uint rgba) diff --git a/ChatTwo/Util/DatePicker.cs b/HellionChat/Util/DatePicker.cs similarity index 99% rename from ChatTwo/Util/DatePicker.cs rename to HellionChat/Util/DatePicker.cs index 58fb068..33d3e83 100644 --- a/ChatTwo/Util/DatePicker.cs +++ b/HellionChat/Util/DatePicker.cs @@ -1,6 +1,6 @@ using System.Globalization; using System.Numerics; -using ChatTwo.Resources; +using HellionChat.Resources; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.ImGuiNotification; @@ -9,7 +9,7 @@ using Dalamud.Interface.Utility.Raii; using Dalamud.Utility; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Util; +namespace HellionChat.Util; // From https://github.com/Flix01/imgui/blob/imgui_with_addons/addons/imguidatechooser/imguidatechooser.cpp public static class DateWidget diff --git a/ChatTwo/Util/ExtraPayload.cs b/HellionChat/Util/ExtraPayload.cs similarity index 98% rename from ChatTwo/Util/ExtraPayload.cs rename to HellionChat/Util/ExtraPayload.cs index baa093a..bd91a35 100644 --- a/ChatTwo/Util/ExtraPayload.cs +++ b/HellionChat/Util/ExtraPayload.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.Util; +namespace HellionChat.Util; public class ColorPayload { diff --git a/ChatTwo/Util/GlobalParametersCache.cs b/HellionChat/Util/GlobalParametersCache.cs similarity index 78% rename from ChatTwo/Util/GlobalParametersCache.cs rename to HellionChat/Util/GlobalParametersCache.cs index 1dbb157..adfba4a 100644 --- a/ChatTwo/Util/GlobalParametersCache.cs +++ b/HellionChat/Util/GlobalParametersCache.cs @@ -2,7 +2,7 @@ using FFXIVClientStructs.FFXIV.Client.UI.Misc; using FFXIVClientStructs.FFXIV.Component.Text; -namespace ChatTwo.Util; +namespace HellionChat.Util; public static class GlobalParametersCache { @@ -10,10 +10,14 @@ public static class GlobalParametersCache public static int GetValue(int index) { - if (index < 0 || index >= Cache.Length) + // Capture the array reference once so the bounds check and the + // indexed read operate on the same instance, even if Refresh + // reassigns Cache between the two operations. + var cache = Cache; + if (index < 0 || index >= cache.Length) return 0; - return Cache[index]; + return cache[index]; } /// diff --git a/ChatTwo/Util/IconUtil.cs b/HellionChat/Util/IconUtil.cs similarity index 95% rename from ChatTwo/Util/IconUtil.cs rename to HellionChat/Util/IconUtil.cs index c7f8eac..7697d41 100755 --- a/ChatTwo/Util/IconUtil.cs +++ b/HellionChat/Util/IconUtil.cs @@ -3,7 +3,7 @@ using System.Runtime.InteropServices; using SixLabors.ImageSharp; using SixLabors.ImageSharp.PixelFormats; -namespace ChatTwo.Util; +namespace HellionChat.Util; // From Kizer: https://github.com/Soreepeong/Dalamud/blob/feature/log-wordwrap/Dalamud/Interface/Spannables/Internal/GfdFileView.cs public readonly unsafe ref struct GfdFileView @@ -59,8 +59,14 @@ public readonly unsafe ref struct GfdFileView return false; } + if (entries.Length == 0) + { + entry = default; + return false; + } + var lo = 0; - var hi = entries.Length; + var hi = entries.Length - 1; while (lo <= hi) { var i = lo + ((hi - lo) >> 1); @@ -70,7 +76,7 @@ public readonly unsafe ref struct GfdFileView { iconId = entries[i].Redirect; lo = 0; - hi = entries.Length; + hi = entries.Length - 1; continue; } diff --git a/ChatTwo/Util/ImGuiUtil.cs b/HellionChat/Util/ImGuiUtil.cs similarity index 99% rename from ChatTwo/Util/ImGuiUtil.cs rename to HellionChat/Util/ImGuiUtil.cs index aa17c22..8331654 100755 --- a/ChatTwo/Util/ImGuiUtil.cs +++ b/HellionChat/Util/ImGuiUtil.cs @@ -1,9 +1,9 @@ using System.Buffers; using System.Numerics; using System.Text; -using ChatTwo.Code; -using ChatTwo.GameFunctions.Types; -using ChatTwo.Resources; +using HellionChat.Code; +using HellionChat.GameFunctions.Types; +using HellionChat.Resources; using Dalamud.Game.ClientState.Keys; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Interface; @@ -15,7 +15,7 @@ using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Bindings.ImGui; -namespace ChatTwo.Util; +namespace HellionChat.Util; internal static class ImGuiUtil { diff --git a/ChatTwo/Util/Lender.cs b/HellionChat/Util/Lender.cs similarity index 93% rename from ChatTwo/Util/Lender.cs rename to HellionChat/Util/Lender.cs index 94c48b3..29132d7 100755 --- a/ChatTwo/Util/Lender.cs +++ b/HellionChat/Util/Lender.cs @@ -1,4 +1,4 @@ -namespace ChatTwo.Util; +namespace HellionChat.Util; internal class Lender { diff --git a/ChatTwo/Util/MathUtil.cs b/HellionChat/Util/MathUtil.cs similarity index 69% rename from ChatTwo/Util/MathUtil.cs rename to HellionChat/Util/MathUtil.cs index 7009885..080fd28 100644 --- a/ChatTwo/Util/MathUtil.cs +++ b/HellionChat/Util/MathUtil.cs @@ -1,6 +1,6 @@ using System.Numerics; -namespace ChatTwo.Util; +namespace HellionChat.Util; public static class MathUtil { @@ -31,7 +31,6 @@ public static class MathUtil => $"X: {X} Y: {Y} Width: {Width} Height: {Height}"; } - // From: https://stackoverflow.com/a/306379 /// /// Checks if two rectangles overlap at any point. /// @@ -40,12 +39,11 @@ public static class MathUtil /// True if overlapping public static bool HasOverlap(this Rectangle a, Rectangle b) { - bool ValueInRange(int value, int min, int max) - => value > min && value < max; - - var xOverlap = ValueInRange(a.X, b.X, b.X + b.Width) || ValueInRange(b.X, a.X, a.X + a.Width); - var yOverlap = ValueInRange(a.Y, b.Y, b.Y + b.Height) || ValueInRange(b.Y, a.Y, a.Y + a.Height); - - return xOverlap && yOverlap; + // Standard AABB overlap test: two rectangles overlap iff they + // overlap on both axes. The previous nested ValueInRange approach + // used strict inequalities at both ends, which dropped identical + // rectangles and shared-edge cases as false negatives. + return a.X < b.X + b.Width && a.X + a.Width > b.X && + a.Y < b.Y + b.Height && a.Y + a.Height > b.Y; } } \ No newline at end of file diff --git a/ChatTwo/Util/MemoryUtil.cs b/HellionChat/Util/MemoryUtil.cs similarity index 95% rename from ChatTwo/Util/MemoryUtil.cs rename to HellionChat/Util/MemoryUtil.cs index 5454e60..b65bab9 100644 --- a/ChatTwo/Util/MemoryUtil.cs +++ b/HellionChat/Util/MemoryUtil.cs @@ -1,6 +1,6 @@ using System.Text; -namespace ChatTwo.Util; +namespace HellionChat.Util; public static class MemoryUtil { diff --git a/ChatTwo/Util/Payloads.cs b/HellionChat/Util/Payloads.cs similarity index 98% rename from ChatTwo/Util/Payloads.cs rename to HellionChat/Util/Payloads.cs index eb9d3c9..62223a9 100755 --- a/ChatTwo/Util/Payloads.cs +++ b/HellionChat/Util/Payloads.cs @@ -1,6 +1,6 @@ using Dalamud.Game.Text.SeStringHandling; -namespace ChatTwo.Util; +namespace HellionChat.Util; internal class PartyFinderPayload : Payload { diff --git a/ChatTwo/Util/SearchSelector.cs b/HellionChat/Util/SearchSelector.cs similarity index 93% rename from ChatTwo/Util/SearchSelector.cs rename to HellionChat/Util/SearchSelector.cs index 60ef653..7d19770 100644 --- a/ChatTwo/Util/SearchSelector.cs +++ b/HellionChat/Util/SearchSelector.cs @@ -4,7 +4,7 @@ using Dalamud.Bindings.ImGui; using System.Collections; using Dalamud.Interface.Utility.Raii; -namespace ChatTwo.Util; +namespace HellionChat.Util; // Modified from: https://github.com/UnknownX7/Hypostasis/blob/master/ImGui/ExcelSheet.cs public static class SearchSelector @@ -84,7 +84,11 @@ public static class SearchSelector foreach (var i in clipper.Rows) { var searched = FilteredSearchSheet[i]; - using var pushedId = ImRaii.PushId(id); + // Mix the row index into the ImGui ID so each Selectable in + // the loop has a distinct ID — using the same id for every + // row collapsed all rows to a single ID-stack entry and made + // selection ambiguous. + using var pushedId = ImRaii.PushId($"{id}##{i}"); if (!drawSelectable(searched, options.IsSelected(searched))) continue; diff --git a/ChatTwo/Util/StringUtil.cs b/HellionChat/Util/StringUtil.cs similarity index 96% rename from ChatTwo/Util/StringUtil.cs rename to HellionChat/Util/StringUtil.cs index 0e52b06..6072be4 100755 --- a/ChatTwo/Util/StringUtil.cs +++ b/HellionChat/Util/StringUtil.cs @@ -1,6 +1,6 @@ using System.Text; -namespace ChatTwo.Util; +namespace HellionChat.Util; internal static class StringUtil { diff --git a/ChatTwo/Util/TabsUtil.cs b/HellionChat/Util/TabsUtil.cs similarity index 99% rename from ChatTwo/Util/TabsUtil.cs rename to HellionChat/Util/TabsUtil.cs index 01cb838..4c0a762 100755 --- a/ChatTwo/Util/TabsUtil.cs +++ b/HellionChat/Util/TabsUtil.cs @@ -1,7 +1,7 @@ -using ChatTwo.Code; -using ChatTwo.Resources; +using HellionChat.Code; +using HellionChat.Resources; -namespace ChatTwo.Util; +namespace HellionChat.Util; public static class TabsUtil { diff --git a/ChatTwo/Util/Tokenizer.cs b/HellionChat/Util/Tokenizer.cs similarity index 99% rename from ChatTwo/Util/Tokenizer.cs rename to HellionChat/Util/Tokenizer.cs index 53901e6..d84da8e 100644 --- a/ChatTwo/Util/Tokenizer.cs +++ b/HellionChat/Util/Tokenizer.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; -namespace ChatTwo.Util; +namespace HellionChat.Util; // Modified from: https://jack-vanlightly.com/blog/2016/2/24/a-more-efficient-regex-tokenizer public static class Tokenizer diff --git a/ChatTwo/Util/WrapperUtil.cs b/HellionChat/Util/WrapperUtil.cs similarity index 92% rename from ChatTwo/Util/WrapperUtil.cs rename to HellionChat/Util/WrapperUtil.cs index 251fb5e..6156de9 100644 --- a/ChatTwo/Util/WrapperUtil.cs +++ b/HellionChat/Util/WrapperUtil.cs @@ -1,7 +1,7 @@ -using ChatTwo.Resources; +using HellionChat.Resources; using Dalamud.Interface.ImGuiNotification; -namespace ChatTwo.Util; +namespace HellionChat.Util; public static class WrapperUtil { diff --git a/ChatTwo/images/chatWindow.png b/HellionChat/images/chatWindow.png similarity index 100% rename from ChatTwo/images/chatWindow.png rename to HellionChat/images/chatWindow.png diff --git a/ChatTwo/images/icon.png b/HellionChat/images/icon.png similarity index 100% rename from ChatTwo/images/icon.png rename to HellionChat/images/icon.png diff --git a/ChatTwo/images/withSimpleTweaks.png b/HellionChat/images/withSimpleTweaks.png similarity index 100% rename from ChatTwo/images/withSimpleTweaks.png rename to HellionChat/images/withSimpleTweaks.png diff --git a/ChatTwo/packages.lock.json b/HellionChat/packages.lock.json similarity index 95% rename from ChatTwo/packages.lock.json rename to HellionChat/packages.lock.json index de7501a..1149114 100644 --- a/ChatTwo/packages.lock.json +++ b/HellionChat/packages.lock.json @@ -54,6 +54,12 @@ "resolved": "3.1.12", "contentHash": "iAg6zifihXEFS/t7fiHhZBGAdCp3FavsF4i2ZIDp0JfeYeDVzvmlbY1CNhhIKimaIzrzSi5M/NBFcWvZT2rB/A==" }, + "SQLitePCLRaw.lib.e_sqlite3": { + "type": "Direct", + "requested": "[3.50.3, )", + "resolved": "3.50.3", + "contentHash": "tVyhqQ8wxgedWiiPFChyZhE8I3PkOM/AE1azsj1qsdYUws13ONBFyi3aDxju4tD2kzedB2q5+50WrTyY0h2gMQ==" + }, "MessagePack.Annotations": { "type": "Transitive", "resolved": "3.1.4", @@ -91,11 +97,6 @@ "resolved": "2.1.11", "contentHash": "PK0GLFkfhZzLQeR3PJf71FmhtHox+U3vcY6ZtswoMjrefkB9k6ErNJEnwXqc5KgXDSjige2XXrezqS39gkpQKA==" }, - "SQLitePCLRaw.lib.e_sqlite3": { - "type": "Transitive", - "resolved": "2.1.11", - "contentHash": "Ev2ytaXiOlWZ4b3R67GZBsemTINslLD1DCJr2xiacpn4tbapu0Q4dHEzSvZSMnVWeE5nlObU3VZN2p81q3XOYQ==" - }, "SQLitePCLRaw.provider.e_sqlite3": { "type": "Transitive", "resolved": "2.1.11", diff --git a/README.md b/README.md index f303b74..b400060 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ [![.NET](https://img.shields.io/badge/.NET-10.0-512BD4)](https://dotnet.microsoft.com/) [![FFXIV](https://img.shields.io/badge/FFXIV-Dawntrail-c3a37f)](https://www.finalfantasyxiv.com/) -**Version 0.6.1** — DSGVO-bewusste Erweiterung von [Chat 2](https://github.com/Infiziert90/ChatTwo) für FINAL FANTASY XIV / Dalamud. +**Version 1.0.0** — DSGVO-bewusster Chat-Ersatz für FINAL FANTASY XIV / Dalamud, basierend auf [Chat 2](https://github.com/Infiziert90/ChatTwo) (EUPL-1.2). -Hellion Chat baut auf Chat 2 auf und ergänzt es um Datenschutz- und Daten-Handling-Kontrollen, die mit den Datenschutz-Regeln in der EU, den USA und Japan im Einklang sind. Alle Chat-2-Funktionen, Befehle und Tastenkürzel funktionieren unverändert. Eigenständiger Plugin-Slot, eigene Konfiguration, eigene Datenbank. +Hellion Chat ergänzt das ursprüngliche Chat-2-Fundament um Datenschutz- und Daten-Handling-Kontrollen, die mit den Datenschutz-Regeln in der EU, den USA und Japan im Einklang sind. Alle aus Chat 2 übernommenen Funktionen, Befehle und Tastenkürzel funktionieren unverändert. Eigenständiger Plugin-Slot, eigene Konfiguration, eigene Datenbank. Eigenständiges Repository, EUPL-1.2-lizenziert. Distribution über Custom-Repo. Selektive Cherry-Picks von Upstream-Chat-2 nach Bedarf, dokumentiert in [UPSTREAM_SYNC.md](UPSTREAM_SYNC.md). @@ -57,7 +57,7 @@ Hellion Chat baut auf [Chat 2](https://github.com/Infiziert90/ChatTwo) von **Inf - **Bilinguale UI** (Englisch + Deutsch) mit Live-Sprachwechsel. Hellion-spezifische Strings in `HellionStrings..resx`. - **Hellion-HUD-Theme** mit Cyan-Teal-Akzenten, Slate-Violet-Tabs, Bernstein-Highlights für aktive Zustände. -- **Chat-Farben-Presets** (v0.6.0) mit sieben Built-in-Bundles in Settings → Aussehen → Chat-Farben: ChatTwo Default, High-Contrast, Pastell, Dark-Mode-Tuned, Hellion (Brand), plus Bonus-Stimmungen Night Blue und Indigo Violet. One-Click-Apply, Battle-Channels bleiben unangetastet. +- **Chat-Farben-Presets** (v0.6.0) mit sieben Built-in-Bundles in Settings → Aussehen → Chat-Farben: Klassik (Chat 2 Default), High-Contrast, Pastell, Dark-Mode-Tuned, Hellion (Brand), plus Bonus-Stimmungen Night Blue und Indigo Violet. One-Click-Apply, Battle-Channels bleiben unangetastet. - **Fenster-Deckkraft-Slider** für Kampf-freundliche Transparenz. - **Mitgelieferte Hellion-Schrift** (Exo 2, OFL-1.1) als optionaler Default statt System-Font. - **Hellion-Logo** im Plugin-Bundle und in der Dalamud-Plugin-Liste. @@ -108,9 +108,9 @@ ChatTwo/ ### Regeln -- **Code-Namespace bleibt `ChatTwo.*`** — Cherry-Picks von Upstream-Bugfixes bleiben damit konfliktarm. +- **Code-Namespace ist `HellionChat.*`** — seit v1.0.0 vollständig konsolidiert auf den Plugin-Namen. - **AssemblyName ist `HellionChat`** — eigener Slot in `pluginConfigs/`, eigene Datei-Manifest, kein Shared State mit Chat 2. -- **Hellion-eigene Strings nur in `HellionStrings.*.resx`** — die Upstream-`Language.*.resx` bleiben unverändert, damit Cherry-Picks aus Chat 2 (inklusive deren Übersetzungs-Updates aus dem Upstream-Crowdin) konfliktarm bleiben. +- **Hellion-eigene Strings in `HellionStrings.*.resx`**, übernommene Strings aus dem Chat-2-Bestand in `Language.*.resx` — die Original-`Language.*.resx` bleibt strukturell erhalten, weil die existierenden Übersetzungen aus dem Crowdin-Bestand der Upstream-Community weiter wertvoll sind. - **Kein Direkt-Eingriff in `Plugin.Interface.UiBuilder.FontAtlas`** außerhalb von `FontManager` — Font-Fallback und Hellion-Font laufen zentral. --- diff --git a/repo.json b/repo.json index 5ade4e6..f412f7f 100644 --- a/repo.json +++ b/repo.json @@ -3,8 +3,8 @@ "Author": "JonKazama-Hellion", "Name": "Hellion Chat", "InternalName": "HellionChat", - "AssemblyVersion": "0.6.1.0", - "Description": "Hellion Chat is built on top of Chat 2 with one removal and a stack\nof privacy controls on top. Tabs, channel filters, RGB colours,\nemotes, screenshot mode, IPC integration and the chat replacement\nwindow itself work the same. The optional webinterface that Chat 2\nships is intentionally not part of this fork because it serves a\ndifferent use case from the smaller default footprint Hellion Chat\nis built around.\n\nOn top of that, Hellion Chat adds privacy and data-handling controls\ndesigned to align with the modern data protection rules that apply\nacross the EU, the United States and Japan. By default only your own\nconversations are stored; messages from strangers, NPCs and system\nspam stay out of the database. Retention windows are configurable per\nchannel, history can be wiped retroactively, and stored data can be\nexported on demand.\n\nKey additions on top of Chat 2:\n\n- Channel whitelist with a Privacy-First default\n- Per-channel retention with a daily background sweep\n- Retroactive cleanup with a Ctrl+Shift confirm\n- Export to Markdown, JSON or CSV\n- First-run wizard with three preset profiles (Privacy-First, Casual,\n Full History)\n- Bilingual UI (English and German) with live language switching\n- Independent plugin state — own config file and database directory,\n so Hellion Chat does not share state with the upstream plugin\n\nBased on Chat 2 by Infi and Anna, licensed under EUPL-1.2.\n\nModding & support: join the Hellion Forge Discord at https://discord.gg/X9V7Kcv5gR — community for Hellion Chat and other Hellion Online Media plugins/tools.", + "AssemblyVersion": "1.0.0.0", + "Description": "Hellion Chat is a privacy-focused chat replacement for FINAL FANTASY XIV based on the Chat 2 codebase (EUPL-1.2). One feature is intentionally removed (the optional webinterface) and a stack of privacy controls is added on top. Tabs, channel filters, RGB colours, emotes, screenshot mode, IPC integration and the chat replacement window itself work the same. The webinterface is intentionally not part of Hellion Chat because it serves a different use case from the smaller default footprint this plugin is built around.\n\nOn top of that, Hellion Chat adds privacy and data-handling controls designed to align with the modern data protection rules that apply across the EU, the United States and Japan. By default only your own conversations are stored; messages from strangers, NPCs and system spam stay out of the database. Retention windows are configurable per channel, history can be wiped retroactively, and stored data can be exported on demand.\n\nKey privacy and data-handling features:\n\n- Channel whitelist with a Privacy-First default\n- Per-channel retention with a daily background sweep\n- Retroactive cleanup with a Ctrl+Shift confirm\n- Export to Markdown, JSON or CSV\n- First-run wizard with three preset profiles (Privacy-First, Casual, Full History)\n- Bilingual UI (English and German) with live language switching\n- Independent plugin state — own config file and database directory, so Hellion Chat does not share state with upstream Chat 2\n\nBased on Chat 2 by Infi and Anna, licensed under EUPL-1.2.\n\nModding & support: join the Hellion Forge Discord at https://discord.gg/X9V7Kcv5gR — community for Hellion Chat and other Hellion Online Media plugins/tools.", "ApplicableVersion": "any", "RepoUrl": "https://github.com/JonKazama-Hellion/HellionChat", "Tags": [ @@ -19,17 +19,17 @@ "LoadSync": false, "CanUnloadAsync": false, "LoadPriority": 0, - "Punchline": "Chat 2 with privacy controls aligned to EU, US and JP rules", - "Changelog": "**Hellion Chat 0.6.1 — Pop-Out Discoverability & /tell Auto-Pop-Out**\n\n- Pop-out button now visible in the chat header (no more hunting through the right-click menu)\n- One-time hint banner explains pop-out tabs and the right-click shortcut\n- New setting: open new /tell tabs directly as pop-out windows (Settings → Chat → Auto-Tell-Tabs)\n- Pop-out input is now enabled by default — closing a pop-out still returns the tab to the sidebar\n- Bugfix: dropping or logging out with an LRU/popped auto-tell tab now also closes its pop-out window (no more ghost windows)\n- Bugfix: dead zone below the chat input bar when the v0.6.0 pop-out hint banner was visible (also fixed retroactively for the v0.6.0 banner inside pop-outs)\n\nModding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR\n\nBased on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).\n\n**Hellion Chat 0.6.0 — UX Polish: Pop-Out Input + Colour Presets**\n\nTwo opt-in UX features land in the same release. Existing users see\nno change unless they enable the new toggles.\n\nPop-out input bar:\n\n- New global master switch in Settings → Window → Frame: \"Enable input\n in pop-outs\". Default OFF so existing behaviour is preserved\n- When enabled, every pop-out window grows a compact input bar at the\n bottom (channel-coloured icon button left, text input right). The\n auto-translate picker is intentionally not part of the compact bar\n in v0.6.0 — typical pop-out workflows (FC greeter, club hostess)\n rarely need it there\n- Each pop-out keeps an independent text buffer and history cursor;\n channel changes still apply globally because that is how the FFXIV\n channel API works\n- Up/Down navigates a shared input history singleton across the main\n window and every open pop-out\n- First pop-out opening after the upgrade shows a one-time hint\n banner pointing users to the new toggle\n\nChat colour presets:\n\n- Seven built-in presets above the per-channel colour list in\n Settings → Appearance → Colours: ChatTwo Default, High-Contrast,\n Pastell, Dark-Mode-Tuned, Hellion (brand-coloured, blue/orange\n Arctic Cyan + Ember Glow palette from the Hellion Online Media\n branding spec), plus two bonus mood presets — Night Blue (royal\n blue, classic-cool) and Indigo Violet (royal violet, glitter-mystic)\n- Apply is immediate and overwrites the channels covered by the\n preset; battle-channel colours are left alone so combat tuning\n stays intact\n\nConfiguration migrates from v10 to v11 with a diagnostic log entry;\nno data is reset. Bilingual (English/German) for both new sections.\n\nBased on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).\n\n**Hellion Chat 0.5.4 — WrapText hardening**\n\nReplaces the unsafe pointer-arithmetic in ImGuiUtil.WrapText with\nSpan- and index-based control flow. Closes the persistent CodeQL\nCritical alert \"unvalidated local pointer arithmetic\" that kept\nre-firing on every shape of the previous fix.\n\nHardening:\n\n- WrapText now allocates a buffer sized by Encoding.UTF8.GetMaxByteCount\n via ArrayPool, validates the actual encoded length against that\n ceiling, and threads the rest of the algorithm through int offsets\n instead of raw byte pointers\n- Pointer arithmetic only happens inside two small private helpers\n (CalcWordWrap and DrawText) that take the pinned base pointer plus\n int offsets sourced from the plugin's own logic, not from any\n virtual-method return\n- Added a 16 KiB upper bound on the buffer rent to prevent a\n pathological input from triggering an unbounded ArrayPool allocation\n\nNo user-visible behaviour change. Word-wrap output is byte-identical\nto v0.5.3.\n\nBased on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).\n\n**Hellion Chat 0.5.3 — Pointer arithmetic hardening**\n\nClosed CodeQL Critical alert in ImGuiUtil.WrapText by validating the\nencoded byte buffer length via GetByteCount before pointer\narithmetic. Single-fix patch on top of v0.5.2.\n\n---\n\nEarlier history: https://github.com/JonKazama-Hellion/HellionChat/releases", + "Punchline": "Chat replacement with privacy controls aligned to EU, US and JP rules — based on Chat 2 (EUPL-1.2)", + "Changelog": "**Hellion Chat 1.0.0 — Standalone Major Release**\n\nFirst fully standalone release. Internal cleanup plus a sweep of\npre-existing correctness, security, threading and resource-leak\nfixes carried over from the upstream codebase. No user action\nrequired — auto-update applies cleanly, configuration and database\npaths unchanged.\n\nStandalone identity:\n\n- Code namespace consolidated from ChatTwo.* to HellionChat.* across\n all source files\n- IPC channels migrated from ChatTwo.* to HellionChat.* (6 channels:\n Register, Available, Unregister, Invoke, GetChatInputState,\n ChatInputStateChanged) — third-party plugins that bound to the old\n channels need to be updated; none known at release time\n- ImGui popup ID renamed to hellionchat-context-popup\n- Repository folder restructured (ChatTwo/ → HellionChat/), all CI\n and build paths updated accordingly\n- Public-facing descriptions reworded from upstream-fork framing to\n standalone framing (Chat 2 attribution preserved per EUPL-1.2)\n- Colour preset 'ChatTwo Default' is now 'Klassik (Chat 2 Default)'\n\nSafety:\n\n- Plugin now refuses to load when upstream Chat 2 is also active —\n bilingual conflict message in EN/DE, throw before any subsystem\n initialization, prevents the runtime crash that previously occurred\n when both plugins replaced the same chat window in parallel\n- SQLite native binary bumped to 3.50.3 (CVE-2025-6965 memory\n corruption from aggregate-term overflow, CVE-2025-7709)\n- NuGet restore now honors packages.lock.json so transitive\n dependencies don't drift between machines or CI runs\n\nCrash-class fixes (formerly latent in upstream):\n\n- MathUtil.HasOverlap now uses a correct AABB test; identical or\n edge-touching rectangles are no longer reported as non-overlapping\n- ChatCode.Equals compares fields directly instead of GetHashCode;\n removes the hash-collision anti-pattern\n- IpcManager.Dispose uses UnregisterAction to match the matching\n RegisterAction call; previous mismatch leaked the action\n subscription on every plugin reload\n- ExtraChat.Dispose now unsubscribes all three IPC subscriptions\n (was only the first); leaks closed\n- TellTarget.FromTarget guards against a zero IPlayerCharacter.Address\n before dereferencing the unsafe Character* cast\n- GameFunctions ResolveTextCommandPlaceholderDetour null-checks the\n Hook reference instead of using the null-forgiving operator\n- Popout.cs and SettingsTabs/Tabs.cs bounds-check list indexing so\n a tab drop or empty-worlds list no longer crashes the UI\n- Debugger.cs now declares IDisposable so the existing Dispose runs\n\nCorrectness fixes:\n\n- GlobalParametersCache.GetValue captures Cache into a local before\n the bounds check, so a concurrent Refresh can't slip a different\n array between check and read\n- IconUtil binary search bounds initialized to entries.Length-1 and\n reset on redirect-restart; entries.Length==0 short-circuits\n- Sheets.WorldsOnDatacenter now compares DataCenter.RowId (was\n Region.RowId) so it actually returns same-DC worlds\n- Message.cs back-reference loop iterates the processed Sender/Content\n properties so chunks added by CheckMessageContent get Message set\n- Language.zh-Hans Webinterface_Start_Success corrected to\n \"网页界面已启动\" (was \"网页界面已停止\")\n\nThreading and async:\n\n- AutoTranslate Entries/ValidEntries are now serialized behind a\n single lock; the preload worker thread and main thread no longer\n race on the underlying dictionary/hash set\n- Privacy retention and cleanup workers bound their framework-refresh\n waits to 5 seconds with a logged timeout; a hung framework tick can\n no longer deadlock the background worker\n\nResource handling:\n\n- EmoteCache reuses the static HttpClient instead of allocating a new\n one per call (closed socket leak)\n- FontManager wraps HttpClient/HttpResponseMessage in using-blocks\n and adds EnsureSuccessStatusCode; failed downloads no longer\n silently produce a zero-byte font file\n- SearchSelector mixes the row index into the ImGui ID stack so\n selectables don't collapse to a single ambiguous ID\n- SettingsTabs/Chat blocked-emote add-button now opens its selector\n popup on left-click\n\nPerformance:\n\n- DbViewer text export caches filteredHistory.Count once instead of\n re-enumerating the IEnumerable on every batch (O(N) instead of\n O(N²) on large histories)\n\nLicense attribution (NOTICE.md, COPYRIGHT, THIRD_PARTY_NOTICES.md\nand the Credits section in README) is unchanged.\n\nBased on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).\n\n**Hellion Chat 0.6.1 — Pop-Out Discoverability & /tell Auto-Pop-Out**\n\n- Pop-out button now visible in the chat header (no more hunting through the right-click menu)\n- One-time hint banner explains pop-out tabs and the right-click shortcut\n- New setting: open new /tell tabs directly as pop-out windows (Settings → Chat → Auto-Tell-Tabs)\n- Pop-out input is now enabled by default — closing a pop-out still returns the tab to the sidebar\n- Bugfix: dropping or logging out with an LRU/popped auto-tell tab now also closes its pop-out window (no more ghost windows)\n- Bugfix: dead zone below the chat input bar when the v0.6.0 pop-out hint banner was visible (also fixed retroactively for the v0.6.0 banner inside pop-outs)\n\nModding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR\n\nBased on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).\n\n**Hellion Chat 0.6.0 — UX Polish: Pop-Out Input + Colour Presets**\n\nTwo opt-in UX features land in the same release. Existing users see\nno change unless they enable the new toggles.\n\nPop-out input bar:\n\n- New global master switch in Settings → Window → Frame: \"Enable input\n in pop-outs\". Default OFF so existing behaviour is preserved\n- When enabled, every pop-out window grows a compact input bar at the\n bottom (channel-coloured icon button left, text input right). The\n auto-translate picker is intentionally not part of the compact bar\n in v0.6.0 — typical pop-out workflows (FC greeter, club hostess)\n rarely need it there\n- Each pop-out keeps an independent text buffer and history cursor;\n channel changes still apply globally because that is how the FFXIV\n channel API works\n- Up/Down navigates a shared input history singleton across the main\n window and every open pop-out\n- First pop-out opening after the upgrade shows a one-time hint\n banner pointing users to the new toggle\n\nChat colour presets:\n\n- Seven built-in presets above the per-channel colour list in\n Settings → Appearance → Colours: ChatTwo Default, High-Contrast,\n Pastell, Dark-Mode-Tuned, Hellion (brand-coloured, blue/orange\n Arctic Cyan + Ember Glow palette from the Hellion Online Media\n branding spec), plus two bonus mood presets — Night Blue (royal\n blue, classic-cool) and Indigo Violet (royal violet, glitter-mystic)\n- Apply is immediate and overwrites the channels covered by the\n preset; battle-channel colours are left alone so combat tuning\n stays intact\n\nConfiguration migrates from v10 to v11 with a diagnostic log entry;\nno data is reset. Bilingual (English/German) for both new sections.\n\nBased on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).\n\n**Hellion Chat 0.5.4 — WrapText hardening**\n\nReplaces the unsafe pointer-arithmetic in ImGuiUtil.WrapText with\nSpan- and index-based control flow. Closes the persistent CodeQL\nCritical alert \"unvalidated local pointer arithmetic\" that kept\nre-firing on every shape of the previous fix.\n\nHardening:\n\n- WrapText now allocates a buffer sized by Encoding.UTF8.GetMaxByteCount\n via ArrayPool, validates the actual encoded length against that\n ceiling, and threads the rest of the algorithm through int offsets\n instead of raw byte pointers\n- Pointer arithmetic only happens inside two small private helpers\n (CalcWordWrap and DrawText) that take the pinned base pointer plus\n int offsets sourced from the plugin's own logic, not from any\n virtual-method return\n- Added a 16 KiB upper bound on the buffer rent to prevent a\n pathological input from triggering an unbounded ArrayPool allocation\n\nNo user-visible behaviour change. Word-wrap output is byte-identical\nto v0.5.3.\n\nBased on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).\n\n**Hellion Chat 0.5.3 — Pointer arithmetic hardening**\n\nClosed CodeQL Critical alert in ImGuiUtil.WrapText by validating the\nencoded byte buffer length via GetByteCount before pointer\narithmetic. Single-fix patch on top of v0.5.2.\n\n---\n\nEarlier history: https://github.com/JonKazama-Hellion/HellionChat/releases", "AcceptsFeedback": true, - "DownloadLinkInstall": "https://github.com/JonKazama-Hellion/HellionChat/releases/download/v0.6.1/latest.zip", - "DownloadLinkUpdate": "https://github.com/JonKazama-Hellion/HellionChat/releases/download/v0.6.1/latest.zip", - "DownloadLinkTesting": "https://github.com/JonKazama-Hellion/HellionChat/releases/download/v0.6.1/latest.zip", - "TestingAssemblyVersion": "0.6.1.0", - "IconUrl": "https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/ChatTwo/images/icon.png", + "DownloadLinkInstall": "https://github.com/JonKazama-Hellion/HellionChat/releases/download/v1.0.0/latest.zip", + "DownloadLinkUpdate": "https://github.com/JonKazama-Hellion/HellionChat/releases/download/v1.0.0/latest.zip", + "DownloadLinkTesting": "https://github.com/JonKazama-Hellion/HellionChat/releases/download/v1.0.0/latest.zip", + "TestingAssemblyVersion": "1.0.0.0", + "IconUrl": "https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/icon.png", "ImageUrls": [ - "https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/ChatTwo/images/chatWindow.png", - "https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/ChatTwo/images/withSimpleTweaks.png" + "https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/chatWindow.png", + "https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/withSimpleTweaks.png" ], "DownloadCount": 0, "IsHide": false, @@ -38,4 +38,4 @@ "social" ] } -] \ No newline at end of file +]