kameloso.config

Functionality related to configuration; verifying it, correcting it, reading it from/writing it to disk, and parsing it from command-line arguments.

Employs the standard std.getopt to read arguments from the command line to construct and populate instances of the structs needed for the bot to function, like IRCClient, IRCServer and IRCBot.

Members

Functions

applyDefaults
void applyDefaults(IRCClient client, IRCServer server, IRCBot bot)

Completes a client's, server's and bot's member fields. Empty members are given values from compile-time defaults.

giveBrightTerminalHint
void giveBrightTerminalHint(Flag!"alsoAboutConfigSetting" alsoConfigSetting)

Display a hint about the existence of the --bright getopt flag.

handleGetopt
auto handleGetopt(Kameloso instance)

Reads command-line options and applies them over values previously read from the configuration file, as well as dictates some other behaviour.

notifyAboutIncompleteConfiguration
void notifyAboutIncompleteConfiguration(string configFile, string binaryPath)

Displays an error if the configuration is *incomplete*, e.g. missing crucial information.

notifyAboutMissingSettings
void notifyAboutMissingSettings(string[][string] missingEntries, string binaryPath, string configFile)

Prints some information about missing configuration entries to the local terminal.

writeConfigurationFile
void writeConfigurationFile(Kameloso instance, string filename)

Write all settings to the configuration filename passed.

See Also

Meta