Table of Contents

Class IrcMessageFormatter

Namespace
EchoHub.Server.Irc
Assembly
EchoHub.Server.Irc.dll
public static class IrcMessageFormatter
Inheritance
IrcMessageFormatter
Inherited Members

Methods

ColorTagsToAnsi(string)

Convert printable color tags ({F:RRGGBB}, {B:RRGGBB}, {X}) to ANSI escape codes for IRC clients. Also passes through content that already uses ANSI codes unchanged.

public static string ColorTagsToAnsi(string text)

Parameters

text string

Returns

string

FormatMessage(MessageDto)

Format a MessageDto as one or more IRC PRIVMSG lines.

public static List<string> FormatMessage(MessageDto message)

Parameters

message MessageDto

Returns

List<string>

SplitMessage(string, int)

Split a message into chunks of approximately maxBytes (UTF-8), at word boundaries.

public static List<string> SplitMessage(string content, int maxBytes)

Parameters

content string
maxBytes int

Returns

List<string>