Class IrcMessageFormatter
public static class IrcMessageFormatter
- Inheritance
-
IrcMessageFormatter
- Inherited Members
Methods
FormatMessage(MessageDto, string?)
Format a MessageDto as one or more IRC PRIVMSG lines.
Attachments are rendered as single link lines \u2014 the widely-supported IRC convention
(clients auto-preview or open plain http(s) URLs) \u2014 never as terminal color art.
publicBaseUrl makes the links absolute so any IRC client can open them.
public static List<string> FormatMessage(MessageDto message, string? publicBaseUrl = null)
Parameters
messageMessageDtopublicBaseUrlstring
Returns
- List<string>
SplitMessage(string, int)
Split a message into chunks of approximately maxBytes (UTF-8), at line and word boundaries.
public static List<string> SplitMessage(string content, int maxBytes)
Parameters
Returns
- List<string>
ToAbsoluteUrl(string, string?)
Joins a relative attachment path onto the configured public base URL. Already-absolute URLs and unset base URLs pass through unchanged.
public static string ToAbsoluteUrl(string url, string? publicBaseUrl)