kameloso.plugins.printer

The Printer plugin takes incoming IRCEvents, formats them into something easily readable and prints them to the screen, optionally with colours. It also supports logging to disk.

It has no commands; all IRCEvents will be parsed and printed, excluding certain types that were deemed too spammy. Print them as well by disabling filterMost, in the configuration file under the header [Printer].

It is not technically necessary, but it is the main form of feedback you get from the plugin, so you will only want to disable it if you want a really "headless" environment.

Modules

formatting
module kameloso.plugins.printer.formatting

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

logging
module kameloso.plugins.printer.logging

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

Members

Classes

PrinterPlugin
class PrinterPlugin

The Printer plugin takes all IRCEvents and prints them to the local terminal, formatted and optionally in colour. Alternatively to disk as logs.

Functions

clearTargetNicknameIfUs
void clearTargetNicknameIfUs(IRCEvent event, IRCPluginState state)

Clears the target nickname if it matches the passed string.

datestamp
auto datestamp()

Returns a string with the current date.

initResources
void initResources(PrinterPlugin plugin)

Ensures that there is a log directory.

initialise
void initialise(PrinterPlugin plugin)

Populates the arrays of types to exclude and include from printing.

onBusMessage
void onBusMessage(PrinterPlugin plugin, string header, Sendable content)

Receives a passed Boxed instance with the "printer" header, listening for cues to ignore the next events caused by the ChanQueryService

querying current channel for information on the channels and their users.

onISUPPORT
void onISUPPORT(PrinterPlugin plugin)

Prints information about the current server as we gain details of it from an RPL_ISUPPORT event.

onLoggableEvent
void onLoggableEvent(PrinterPlugin plugin, IRCEvent event)

Logs an event to disk.

onPing
void onPing(PrinterPlugin plugin)

Writes all buffered log lines to disk on PING.

onPrintableEvent
void onPrintableEvent(PrinterPlugin plugin, IRCEvent event)

Prints an event to the local terminal.

setup
void setup(PrinterPlugin plugin)

Initialises the Printer plugin by allocating a slice of memory for the linebuffer. Loops (as a Fiber to print the date in YYYY-MM-DD format to the screen and to any active log files upon day change.

teardown
void teardown(PrinterPlugin plugin)

De-initialises the plugin.

Structs

PrinterSettings
struct PrinterSettings

All Printer plugin options gathered in a struct.

See Also

Meta