kameloso.common

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

Members

Enums

Next
enum Next

Enum of flags carrying the meaning of "what to do next".

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

errnoStrings
string[134] errnoStrings;

Reverse mapping of errno values to their string names.

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.

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