kameloso.plugins.pipeline

The Pipeline plugin opens a Posix named pipe in a temporary directory or the current directory, to which you can pipe text and have it be sent verbatim to the server. There is also syntax to manually send bus messages to plugins.

It has no commands; it doesn't listen to IRCEvents at all, only to what is sent to it via the named FIFO pipe.

This requires version Posix, which is true for UNIX-like systems (like Linux and macOS).

Members

Classes

PipelinePlugin
class PipelinePlugin

The Pipeline plugin reads from a local named pipe (FIFO) for messages to send to the server, as well as to live-control the bot to a certain degree.

Functions

closeFD
auto closeFD(int fd)

Closes a file descriptor.

createFIFOFile
void createFIFOFile(string filename)

Creates a FIFO (named pipe) in the filesystem.

initialiseFIFO
auto initialiseFIFO(PipelinePlugin plugin)

Initialises the FIFO.

isFIFO
auto isFIFO(string filename)

Checks if a file is a FIFO.

onWelcome
void onWelcome(PipelinePlugin plugin)

Does three things upon RPL_WELCOME;

openFIFO
auto openFIFO(string filename)

Opens a FIFO for reading. The file descriptor is set to non-blocking.

printUsageText
void printUsageText(PipelinePlugin plugin, bool reinit)

Prints the usage text to screen.

readFIFO
auto readFIFO(PipelinePlugin plugin)

Reads from the FIFO and sends messages to the main thread based upon what was read. If something was indeed read, true is returned to signal to the caller that it should check for new messages.

reload
void reload(PipelinePlugin plugin)

Reloads the PipelinePlugin.

resolvePath
auto resolvePath(PipelinePlugin plugin)

Resolves the filename of the FIFO to use.

teardown
void teardown(PipelinePlugin plugin)

Tears down the PipelinePlugin by closing the FIFO file descriptor and removing the FIFO file.

tick
auto tick(PipelinePlugin plugin, Duration elapsed)

Plugin tick function. Reads from the pipe and either issues bus messages based on what was read or sends the piped text to the server verbatim.

Structs

PipelineSettings
struct PipelineSettings

All settings for a PipelinePlugin, aggregated.

See Also

Meta