kameloso.plugins.timer

Plugin offering announcement timers; routines that periodically send lines of text to a channel.

Members

Classes

TimerPlugin
class TimerPlugin

The Timer plugin serves reoccurring (timered) announcements.

Functions

createTimerFiber
auto createTimerFiber(TimerPlugin plugin, string channelName, string name)

Given a Timer and a string channel name, creates a Fiber that implements the timer.

handleAddToTimer
void handleAddToTimer(TimerPlugin plugin, IRCEvent event, string slice)

Adds a line to an existing timer.

handleDelTimer
void handleDelTimer(TimerPlugin plugin, IRCEvent event, string slice)

Deletes an existing timer.

handleListTimers
void handleListTimers(TimerPlugin plugin, IRCEvent event)

Lists all timers.

handleModifyTimer
void handleModifyTimer(TimerPlugin plugin, IRCEvent event, string slice)

Modifies an existing timer.

handleModifyTimerLines
void handleModifyTimerLines(TimerPlugin plugin, IRCEvent event, string slice, Flag!"insert" insert)

Edits a line of an existing timer, or insert one at a specific line position.

handleNewTimer
void handleNewTimer(TimerPlugin plugin, IRCEvent event, string slice)

Creates a new timer.

handleSelfjoin
void handleSelfjoin(TimerPlugin plugin, string channelName, Flag!"force" force)

Registers a new TimerPlugin.Channel as we join a channel, so there's always a state struct available.

handleSuspendTimer
void handleSuspendTimer(TimerPlugin plugin, IRCEvent event, string slice, Flag!"suspend" suspend)

Suspends or resumes a timer, by modifying Timer.suspended.

initResources
void initResources(TimerPlugin plugin)

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

loadTimers
void loadTimers(TimerPlugin plugin)

Loads timers from disk.

onAnyMessage
void onAnyMessage(TimerPlugin plugin, IRCEvent event)

Bumps the message count for any channel on incoming channel messages.

onCommandTimer
void onCommandTimer(TimerPlugin plugin, IRCEvent event)

Adds, deletes or lists timers for the specified target channel.

onSelfjoin
void onSelfjoin(TimerPlugin plugin, IRCEvent event)

Simply passes on execution to handleSelfjoin.

onWelcome
void onWelcome(TimerPlugin plugin)

Loads timers from disk.

reload
void reload(TimerPlugin plugin)

Reloads resources from disk.

saveTimers
void saveTimers(TimerPlugin plugin)

Saves timers to disk in JSON format.

selftest
auto selftest(TimerPlugin plugin, Selftester s)

Performs self-tests against another bot.

startTimerMonitor
void startTimerMonitor(TimerPlugin plugin)

Starts the monitor which loops over Timers and calls their Fibers in turn.

Structs

Timer
struct Timer

Definitions of a timer.

TimerSettings
struct TimerSettings

All TimerPlugin runtime settings, aggregated in a struct.

See Also

Meta