20 Commits

Author SHA1 Message Date
JonKazama-Hellion ddd72a878e refactor(emotes): drop async void on LoadData
async void Task.Run() is a no-op for awaiting purposes since the void
returns immediately. Switch LoadData to async Task and have the two
callers fire-and-forget the task directly. Exceptions still go through
the existing try/catch inside LoadData.
2026-05-02 21:20:16 +02:00
JonKazama-Hellion da3c1f6832 fix(emotes): mark required properties to silence CS8618
Mark Emote.Id, Top100.Id, Top100.Code and Top100.ImageType as required
so the JSON deserializer enforces the contract instead of relying on
default-null semantics. Removes the four CS8618 warnings the build has
been carrying since v0.4.0.
2026-05-02 21:17:57 +02:00
JonKazama-Hellion 50963ccf1b fix(v0.5.0): pre-release polish from full-codebase review
- Plugin.cs: mark RetentionSweepRunning volatile so the ImGui thread
  reads the latest value without a stale register-cached copy
- EmoteCache.cs: reset State to Unloaded on exception so a later
  trigger can retry instead of being blocked by the early-out
- Settings.cs: switch the SaveAndClose / Discard buttons to Allman
  bracing for consistency with the rest of the file, and include the
  ItemSpacing in the Ko-fi-button right-edge calculation
- Privacy.cs: add a saved-policy hint above the manual retention
  Ctrl+Shift button so the existing Cleanup wording pattern is
  matched here too
- HellionStrings: drop seven unreferenced keys (Theme_Heading,
  Migration_Notification_*, Migration_Webinterface_Removed_*,
  AutoTellTabs_Migration_*) and their EN/DE values, add the new
  Retention_Help_SavedNote string
2026-05-02 17:50:32 +02:00
Infi 0679a0e57a Fix a regression from API 15 updates
(cherry picked from commit ff899ffe54ef76bcdf9c13b5690957c5b5e17637)
2026-05-02 04:10:22 +02:00
JonKazama-Hellion 2ce30383d9 Refuse to write emote cache files outside the cache directory
Audit finding H-1. Defense-in-depth fix for EmoteCache.LoadAsync,
which interpolated the BetterTTV-supplied Id and ImageType straight
into a Path.Join. HTTPS protects the wire today, but a compromised
upstream that hands back Id values like "../foo" would land outside
EmoteCacheV1, anywhere under pluginConfigs that the plugin can write.

Resolve the candidate path with Path.GetFullPath, then assert it
starts with the cache directory plus a directory separator (so
"EmoteCacheV1Sibling" cannot match "EmoteCacheV1"). Throw
InvalidOperationException on mismatch — the surrounding load
already swallows exceptions and logs them, so a tampered entry
becomes a visible error in the log instead of a silent miss.
2026-05-02 02:50:29 +02:00
JonKazama-Hellion 71aefd30eb Stop the BetterTTV cache and font atlas from logging on every load
Two long-standing upstream bugs surfaced in our distribution as
red error rows on every plugin load. Neither is caused by the
fork's own code, but both happen under our plugin name in the
log so they had to go before the plugin gets handed to anyone.

EmoteCache.LoadData fed BetterTTV's API responses straight into
Dictionary.TryAdd. The Top100 endpoint occasionally returns rows
with a null Code field, which tripped ArgumentNullException and
killed the entire emote load. Filter null/empty codes out
explicitly before insertion so a single bad row no longer breaks
the cache for everyone else.

FontManager.BuildFonts called fontId.AddToBuildToolkit without
guarding for the case where the configured SystemFontId points at
a font that isn't installed (e.g. "Crimson Text" on a Linux box,
or a font the user uninstalled after picking it). The atlas build
then crashed and dumped a Dalamud DelegateFontHandle error every
single load. Wrap the call in AddFontWithFallback: if the font
isn't found, log a warning, fall back to the bundled
NotoSansCjkRegular asset and continue. Applied to both the regular
and italic font handles.
2026-05-01 22:37:18 +02:00
Infi b4cb8b25ec - API 15
- Migrate config for API 15
- Migrate database for API 15
- Allow usage of new target source
- Implement first tell target option
2026-04-30 02:59:58 +02:00
Infi efddaf30ad - API 13 2025-08-06 22:24:45 +02:00
Infi 5e93732183 Add pre-testing version of the webinterface 2024-08-24 03:05:33 +02:00
Infi f76f0e91d0 Update for 7.0, part 1 2024-06-30 05:07:11 +02:00
Infi 0936c87f8d Block some emotes 2024-05-23 16:27:08 +02:00
Infi 3d9f5a2764 Use higher resolution emotes and remove old emote cache 2024-05-15 21:10:07 +02:00
Infi 0de883ec39 Display emote name if loading failed 2024-05-14 00:44:06 +02:00
Infi 32ccf72112 Fix FrameDelay being too fast 2024-05-11 09:09:36 +02:00
Infi 662e65d881 More emote improvements 2024-05-11 07:43:05 +02:00
Infi 050485fece Load up to 1000 emotes 2024-05-11 06:47:21 +02:00
Infi fa41d22cb8 Only load emote list if the user has them activated 2024-05-11 05:13:31 +02:00
Infi b7286b8010 Implement emotes part 2 2024-05-09 19:09:36 +02:00
Infi d0212023eb Remove debug informations 2024-05-08 22:20:22 +02:00
Infi 4210d634ab BTTV emote support part 1 & keep Input focus option 2024-05-08 00:04:07 +02:00