mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
Generated by AurionDocs
Job ID: 934f8c39-8082-4942-8d17-72ed8f5f8d50
Source commit: 40aea9a
858 B
858 B
IrcMessageFormatter
File:
src/EchoHub.Server.Irc/IrcMessageFormatter.cs
Kind: class
public static class IrcMessageFormatter
IrcMessageFormatter formats a MessageDto into IRC PRIVMSG lines for an EchoHub channel. It splits content into IRC-friendly chunks (up to 400 bytes per line), handles CTCP ACTION content, and prefixes replies with the compact > nick: snippet | prefix when a reply exists. Attachments are emitted as separate lines with absolute URLs (constructed from the optional publicBaseUrl) and labeled by kind (Image, Audio, or File). If present, embeds are appended via the embed formatter. When a reply references encrypted room content, the snippet is shown as [encrypted] and non-encrypted snippets are truncated to 80 characters to fit IRC constraints.