IRCPlugin

Abstract IRC plugin class.

This is currently shared with all service-class "plugins".

Members

Functions

channelSpecificCommands
CommandMetadata[string] channelSpecificCommands(string channelName)

Returns an array of the descriptions of the channel-specific commands a plugin offers.

commands
CommandMetadata[string] commands()

Returns an array of the descriptions of the commands a plugin offers.

deserialiseConfigFrom
void deserialiseConfigFrom(string configFile, string[][string] missingEntries, string[][string] invalidEntries)

Reads serialised configuration text into the plugin's settings struct.

initResources
void initResources()

Called when the plugin is requested to initialise its disk resources.

initialise
void initialise()

Called when the plugin is first loaded.

isEnabled
bool isEnabled()

Returns whether or not the plugin is enabled in its settings.

name
string name()

Returns the name of the plugin.

onBusMessage
void onBusMessage(string header, Sendable content)

Called when a bus message arrives from another plugin.

onEvent
void onEvent(IRCEvent event)

Called to let the plugin react to a new event, parsed from the server.

postprocess
void postprocess(IRCEvent event)

Allows a plugin to modify an event post-parsing.

printSettings
void printSettings()

Called when we want a plugin to print its Settings-annotated struct of settings.

reload
void reload()

Reloads the plugin, where such is applicable.

selftest
Ternary selftest(Selftester )

Performs self-tests against another bot.

serialiseConfigInto
bool serialiseConfigInto(Appender!(char[]) sink)

Called to let the plugin contribute settings when writing the configuration file.

setSettingByName
bool setSettingByName(string setting, string value)

Called when we want to change a setting by its string name.

setup
void setup()

Called at program start but before connection has been established.

teardown
void teardown()

Called during shutdown of a connection; a plugin's would-be destructor.

tick
bool tick(Duration elapsed)

Called on each iteration of the main loop.

Imports

Ternary (from std.typecons)
public import std.typecons : Ternary;
Undocumented in source.

Structs

CommandMetadata
struct CommandMetadata

Metadata about a IRCEventHandler.Command- and/or IRCEventHandler.Regex-annotated event handler.

Variables

state
IRCPluginState state;

An IRCPluginState instance containing variables and arrays that represent the current state of the plugin. Should generally be passed by reference.

See Also