Files
owncast-IRC-bridge/chat-summaries/2026-03-12_strip-irc-formatting-summary.md

18 lines
821 B
Markdown
Raw Permalink Normal View History

# Strip IRC Formatting Codes from Owncast-bound Messages
**Date:** 2026-03-12
## Task
IRC messages forwarded to Owncast contained mIRC formatting control codes (`\x02`, `\x03`, `\x0F`, etc.) that rendered as garbage glyphs since Owncast doesn't support any message styling.
## Changes
- **New file: `src/irc_format.rs`** — `strip_formatting()` function that removes all IRC formatting control codes: bold, color (with fg/bg digit parameters), reset, monospace, reverse, italic, strikethrough, and underline. Includes 18 unit tests.
- **`src/irc_task.rs`** — Call `strip_formatting()` on the message body before constructing the `BridgeEvent`, so all downstream consumers see clean text.
- **`src/main.rs`** — Registered the new `irc_format` module.
## Follow-up
- None identified. No new dependencies added.