dialect.postprocessors

Postprocessor package module.

A Postprocessor is a class that is passed an IRCEvent after it has been parsed, and allowed to make last-minute modifications to it.

Modules

twitch
module dialect.postprocessors.twitch

The Twitch postprocessor processes IRCEvents after they are parsed, and deals with Twitch-specifics. Those include extracting the colour someone's name should be printed in, their alias/"display name" (generally their nickname cased), converting the event to some event types unique to Twitch, etc.

Members

Aliases

priority
alias priority = Priority

Helper alias to use the proper style guide and still be able to instantiate Priority instances with UFCS.

Functions

instantiatePostprocessors
auto instantiatePostprocessors()

Instantiates all postprocessors represented by a PostprocessorRegistrationEntry in registeredPostprocessors.

registerPostprocessor
void registerPostprocessor(Priority priority, Postprocessor function() ctor)

Registers a postprocessor to be instantiated on library initialisation by creating a PostprocessorRegistrationEntry and appending it to registeredPostprocessors.

Interfaces

Postprocessor
interface Postprocessor

Postprocessor interface for concrete postprocessors to inherit from.

Mixin templates

PostprocessorRegistration
mixintemplate PostprocessorRegistration(ThisPostprocessor, Priority priority = 0.priority, string module_ = __MODULE__)

Mixes in a module constructor that registers the supplied Postprocessor class in the module to be instantiated on library initialisation.

Structs

PostprocessorRegistrationEntry
struct PostprocessorRegistrationEntry

An entry in registeredPostprocessors corresponding to a postprocessor registered to be instantiated on library initialisation.

Priority
struct Priority

Embodies the notion of a priority at which a postprocessor should be instantiated, and as such, the order in which they will be called to process events.

Variables

registeredPostprocessors
PostprocessorRegistrationEntry[] registeredPostprocessors;

Array of registered postprocessors, represented by PostprocessorRegistrationEntry/-ies, to be instantiated on library initialisation.

See Also

Meta