SeenSettings

We want our plugin to be *configurable* with a section for itself in the configuration file. For this purpose we create a "Settings" struct housing our configurable bits, which we already made an instance of in SeenPlugin.

If it's annotated with Settings, the wizardry will pick it up and each member of the struct will be given its own line in the configuration file. Note that not all types are supported, such as associative arrays or nested structs/classes.

If the name ends with "Settings", that will be stripped from its section header in the file. Hence, this plugin's SeenSettings will get the header [Seen].

version(WithSeenPlugin)
private
@Settings
struct SeenSettings {}

Members

Variables

enabled
bool enabled;

Toggles whether or not the plugin should react to events at all. The @Enabler annotation makes it special and lets us easily enable or disable the plugin without having checks everywhere.

ignoreNonChatEvents
bool ignoreNonChatEvents;

Toggles whether or not non-chat events, such as JOINs, PARTs and the such, should be considered as observations. If set, only chatty events will count as being seen.