kameloso.plugins.time

A simple plugin for querying the time in different timezones.

Members

Classes

TimePlugin
class TimePlugin

The Time plugin replies to queries of what the time is in a given timezone.

Functions

getTimezoneByName
auto getTimezoneByName(string specified)

Takes a string representation of a timezone (e.g. Europe/Stockholm) and returns a TimeZone that corresponds to it, if one was found.

initResources
void initResources(TimePlugin plugin)

Reads and writes the file of timezones to disk, ensuring that they're there and properly formatted.

onCommandSetZone
void onCommandSetZone(TimePlugin plugin, IRCEvent event)

Sets the timezone for a channel, to be used to properly pad the output of !time.

onCommandTime
void onCommandTime(TimePlugin plugin, IRCEvent event)

Reports the time in the specified timezone, in an override specified in the timezones definitions file, or in the one local to the bot.

reload
void reload(TimePlugin plugin)

Reloads the timezones map from disk.

saveResourceToDisk
void saveResourceToDisk(string[string] aa, string filename)

Saves the timezone map to disk in JSON format.

selftest
auto selftest(TimePlugin _, Selftester s)

Performs self-tests against another bot.

Structs

TimeSettings
struct TimeSettings

All TimePlugin runtime settings, aggregated in a struct.

Variables

installedTimezones
string[] installedTimezones;

String array of installed timezone names.

zonestringAliases
string[string] zonestringAliases;

Timezone string aliases.

See Also

Meta