kameloso.common

Common functions used throughout the program, generic enough to be used in several places, not fitting into any specific one.

Members

Functions

findURLs
auto findURLs(string line)

Finds URLs in a string, returning an array of them. Does not filter out duplicates.

initLogger
void initLogger(Flag!"monochrome" monochrome, Flag!"brightTerminal" bright, Flag!"headless" headless, Flag!"flush" flush)

Initialises the KamelosoLogger logger for use in this thread.

printGCStats
void printGCStats()

Prints garbage collector statistics to the local terminal.

printStacktrace
void printStacktrace()

Prints the current stacktrace to the terminal.

printVersionInfo
void printVersionInfo(Flag!"colours" colours)

Prints out the bot banner with the version number and GitHub URL, with the passed colouring.

Static variables

errnoStrings
string[134] errnoStrings;

Reverse mapping of errno values to their string names.

Structs

OutgoingLine
struct OutgoingLine

A string to be sent to the IRC server, along with whether the message should be sent quietly or if it should be displayed in the terminal.

RehashingAA
struct RehashingAA(K, V)

A wrapper around a native associative array that you can controllably set to automatically rehash as entries are added.

Variables

logger
KamelosoLogger logger;

Instance of a KamelosoLogger, providing timestamped and coloured logging.

settings
CoreSettings* settings;

A CoreSettings struct global, housing certain runtime settings.

See Also

Meta