kameloso.plugins.printer.formatting

Implementation of Printer plugin functionality that concerns formatting. For internal use.

The IRCEvent-annotated handlers must be in the same module as the PrinterPlugin, but these implementation functions can be offloaded here to limit module size a bit.

Members

Aliases

TF
alias TF = TerminalForeground
Undocumented in source.

Enums

EventPrintingBright
enum EventPrintingBright

Default colours for printing events on a bright terminal background.

EventPrintingDark
enum EventPrintingDark

Default colours for printing events on a dark terminal background.

Functions

containsNickname
auto containsNickname(string haystack, string needle)

Searches a string for a substring that isn't surrounded by characters that can be part of a nickname. This can detect a nickname in a string without getting false positives from similar nicknames.

formatMessageColoured
void formatMessageColoured(PrinterPlugin plugin, Sink sink, IRCEvent event, Flag!"bellOnMention" bellOnMention, Flag!"bellOnError" bellOnError)

Formats an IRCEvent into an output range sink, coloured.

formatMessageMonochrome
void formatMessageMonochrome(PrinterPlugin plugin, Sink sink, IRCEvent event, Flag!"bellOnMention" bellOnMention, Flag!"bellOnError" bellOnError)

Formats an IRCEvent into an output range sink, in monochrome.

highlightEmotes
auto highlightEmotes(IRCEvent event, Flag!"colourful" colourful, CoreSettings settings)
Undocumented in source. Be warned that the author may not have intended to support it.
highlightEmotesImpl
void highlightEmotesImpl(Sink sink, string line, string emotes, TerminalForeground pre, TerminalForeground post, Flag!"colourful" colourful, CoreSettings settings)
Undocumented in source. Be warned that the author may not have intended to support it.
put
void put(Sink sink, Args args)

Puts a variadic list of values into an output range sink.

withoutTypePrefix
auto withoutTypePrefix(string typestring)

Slices away any type prefixes from the string of a IRCEvent.Type.

See Also

Meta