Implementation of Printer plugin functionality that concerns formatting. For internal use.
Implementation of Printer plugin functionality that concerns logging. For internal use.
The Printer plugin takes all IRCEvents and prints them to the local terminal, formatted and optionally in colour. Alternatively to disk as logs.
Clears the target nickname if it matches the passed string.
Returns a string with the current date.
Ensures that there is a log directory.
Populates the arrays of types to exclude and include from printing.
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.
Prints information about the current server as we gain details of it from an RPL_ISUPPORT event.
Logs an event to disk.
Writes all buffered log lines to disk on PING.
Prints an event to the local terminal.
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.
De-initialises the plugin.
All Printer plugin options gathered in a struct.
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.