kameloso.plugins

Plugins for the **kameloso** bot.

See https://github.com/zorael/kameloso/wiki/Current-plugins for a list and a description of all available plugins.

Modules

admin
module kameloso.plugins.admin

The Admin plugin features bot commands which help with debugging the current state, like printing the current list of users, the current channels, the raw incoming strings from the server, and some other things along the same line.

automode
module kameloso.plugins.automode

The Automode plugin handles automatically setting the modes of users in a channel. The common use-case is to have someone be automatically set to +o (operator) when joining.

bash
module kameloso.plugins.bash

The Bash plugin looks up quotes from bash.org (or technically bashforever.com) and reports them to the appropriate nickname or channel.

chatbot
module kameloso.plugins.chatbot

The Chatbot plugin is a diminishing collection of small, harmless features; like say/echo for simple repeating of text.

common
module kameloso.plugins.common

Contains the definition of an IRCPlugin and its ancillaries, as well as mixins to fully implement it.

counter
module kameloso.plugins.counter

A simple counter plugin.

help
module kameloso.plugins.help

The Help plugin serves the help command, and nothing else at this point.

note
module kameloso.plugins.note

The Note plugin allows for storing notes to offline users, to be replayed when they next join the channel.

oneliner
module kameloso.plugins.oneliner

The Oneliner plugin serves to provide custom commands, like !vods, !youtube, and any other static-reply !command (provided a prefix of "!").

pipeline
module kameloso.plugins.pipeline

The Pipeline plugin opens a Posix named pipe in a temporary directory or the current directory, to which you can pipe text and have it be sent verbatim to the server. There is also syntax to manually send bus messages to plugins.

poll
module kameloso.plugins.poll

The Poll plugin offers the ability to hold votes/polls in a channel. Any number of choices is supported, as long as they're more than one.

printer
module kameloso.plugins.printer

The Printer plugin takes incoming IRCEvents, formats them into something easily readable and prints them to the screen, optionally with colours. It also supports logging to disk.

quote
module kameloso.plugins.quote

The Quote plugin allows for saving and replaying user quotes.

same
module kameloso.plugins.same

This is an example toy plugin to showcase how one could be written to react to non-!command messages.

sedreplace
module kameloso.plugins.sedreplace

The SedReplace plugin imitates the UNIX sed tool, allowing for the replacement/substitution of text. It does not require the tool itself though, and will work on Windows too.

seen
module kameloso.plugins.seen

The Seen plugin implements "seen"; the ability for someone to query when a given nickname was last encountered online.

services
module kameloso.plugins.services

"Service"-level plugins, used to carry out tasks behind the scenes.

stopwatch
module kameloso.plugins.stopwatch

A simple stopwatch plugin. It offers the ability to start and stop timers, to get how much time passed between the creation of a stopwatch and the cessation of it.

time
module kameloso.plugins.time

A simple plugin for querying the time in different timezones.

timer
module kameloso.plugins.timer

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

twitch
module kameloso.plugins.twitch

This is a Twitch channel bot. It supports song requests, counting how many times an emote has been used, reporting how long a viewer has been a follower, how much time they have spent watching the stream, and some miscellanea.

unittest_
module kameloso.plugins.unittest_

Unit test plugin.

webtitle
module kameloso.plugins.webtitle

The Webtitle plugin catches URLs pasted in a channel, follows them and reports back the title of the web page that was linked to.

Members

Aliases

priority
alias priority = Priority

Helper alias to use the proper style guide and still be able to instantiate Priority instances with UFCS.

Functions

instantiatePlugins
auto instantiatePlugins(IRCPluginState state)

Instantiates all plugins represented by a PluginRegistrationEntry in registeredPlugins.

registerPlugin
void registerPlugin(Priority priority, IRCPlugin function(IRCPluginState) ctor)

Registers a plugin to be instantiated on program startup/connect by creating a PluginRegistrationEntry and appending it to registeredPlugins.

Mixin templates

PluginRegistration
mixintemplate PluginRegistration(Plugin, Priority priority = 0.priority, string module_ = __MODULE__)

Mixes in a module constructor that registers the supplied IRCPlugin subclass to be instantiated on program startup/connect.

Structs

PluginRegistrationEntry
struct PluginRegistrationEntry

An entry in registeredPlugins corresponding to a plugin registered to be instantiated on program startup/connect.

Priority
struct Priority

Embodies the notion of a priority at which a plugin should be instantiated, and as such, the order in which they will be called to handle events.

Variables

registeredPlugins
PluginRegistrationEntry[] registeredPlugins;

Array of registered plugins, represented by PluginRegistrationEntry/-ies, to be instantiated on program startup/connect.

Examples

import kameloso.plugins;
import kameloso.plugins.common;

final class MyPlugin : IRCPlugin
{
    mixin IRCPluginImpl;
}

mixin PluginRegistration!MyPlugin;
import kameloso.plugins;

IRCPluginState state;
// state setup...

IRCPlugin[] plugins = instantiatePlugins(state);

See Also

Meta