kameloso.common

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

Members

Functions

assertMultilineOpEquals
void assertMultilineOpEquals(const(char[]) actual, const(char[]) expected, string file, uint line)

Asserts that two multiline strings are equal, with a more detailed error message than the default assert.

findURLs
auto findURLs(string line)

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

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

globalAbort
Flag!"abort" globalAbort;

Abort flag.

globalHeadless
Flag!"headless" globalHeadless;

Headless flag.

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.

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