writeToDisk

Saves the passed configuration text to disk, with the given filename.

Optionally (and by default) adds the "kameloso" version banner at the head of it.

private @safe
void
writeToDisk
(
const string filename
,
const string configurationText
,
const Flag!"addBanner" banner = Yes.addBanner
)

Parameters

filename string

Filename of file to write to.

configurationText string

Content to write to file.

banner Flag!"addBanner"

Whether or not to add the "kameloso bot" banner at the head of the file.

Examples

Appender!(char[]) sink;
sink.serialise(client, server, settings);
immutable configText = sink.data.justifiedEntryValueText;
writeToDisk("kameloso.conf", configText, Yes.addBanner);