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.
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.
The Bash plugin looks up quotes from bash.org (or technically bashforever.com) and reports them to the appropriate nickname or channel.
The Chatbot plugin is a diminishing collection of small, harmless features; like say/echo for simple repeating of text.
This module contains common functions and types used by all plugins.
A simple counter plugin.
The Help plugin serves the help command, and nothing else at this point.
The Note plugin allows for storing notes to offline users, to be replayed when they next join the channel.
The Oneliner plugin serves to provide custom commands, like !vods, !youtube, and any other static-reply !command (provided a prefix of "!").
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.
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.
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.
The Quote plugin allows for saving and replaying user quotes.
This is an example toy plugin to showcase how one could be written to react to non-!command messages.
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.
The Seen plugin implements "seen"; the ability for someone to query when a given nickname was last encountered online.
"Service"-level plugins, used to carry out tasks behind the scenes.
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.
A simple plugin for querying the time in different timezones.
Plugin offering announcement timers; routines that periodically send lines of text to a channel.
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.
Unit test plugin.
The Webtitle plugin catches URLs pasted in a channel, follows them and reports back the title of the web page that was linked to.
Helper alias to use the proper style guide and still be able to instantiate Priority instances with UFCS.
Concrete implementation of a DeferredAction.
Abstract IRC plugin class.
Whether an annotated function should be allowed to trigger on events in only home channels or in guest ones as well.
Annotation denoting that a variable enables and disables a plugin.
The tristate results from comparing a username with the admin or whitelist/elevated/operator/staff lists.
What level of permissions is needed to trigger an event handler.
In what way the contents of a IRCEvent must start (be "prefixed") for an annotated function to be allowed to trigger.
Annotation denoting that a struct variable or struct type is to be considered as housing settings for a plugin, and should thus be serialised and saved in the configuration file.
Declaration of what order event handler function should be given with respects to other functions in the same plugin module.
Judges whether an event may be triggered, based on the event itself and the annotated Permissions of the handler in question. Implementation function.
Changes a setting of a plugin, given both the names of the plugin and the setting, in string form.
Asserts that a parameter storage class is not ref if inFiber, and neither ref nor out if not inFiber. To be run during CTFE.
Instantiates a DeferredActionImpl in the guise of a DeferredAction with the implicit type T as payload and appends it to the passed IRCPlugin's deferredActions array.
Instantiates a DeferredActionImpl in the guise of a DeferredAction with the implicit type T as payload and appends it to the passed IRCPlugin's deferredActions array.
Construct and enqueue a function replay in the plugin's queue of such.
Decides if a sender meets a Permissions and is allowed to trigger an event handler, or if a WHOIS query is needed to be able to tell.
Judges whether an event may be triggered, based on the event itself and the annotated Permissions of the handler in question. Implementation function.
Instantiates all plugins represented by a PluginRegistrationEntry in registeredPlugins.
Mixin that adds a check to ensure that the event type of the event being handled is one of the expected types for the function it is mixed into.
Implementation of the memory corruption check.
Test function for memoryCorruptionCheck with a custom event parameter name.
Test function for memoryCorruptionCheck with a custom UDA index.
Test function for memoryCorruptionCheck with default parameters.
Evaluates whether or not the message in an event satisfies the PrefixPolicy specified, as fetched from a IRCEventHandler.Command or IRCEventHandler.Regex UDA.
Registers a plugin to be instantiated on program startup/connect by creating a PluginRegistrationEntry and appending it to registeredPlugins.
Convenience function that returns a kameloso.plugins.Replay of the right type, *with* a subclass plugin reference attached.
Sanitise event, used upon UTF/Unicode exceptions.
Sanity-checks a plugin's IRCEventHandlers at compile time.
Embodies the notion of an action a plugin defers to the main event loop for later execution.
Changes a setting of a plugin, given both the names of the plugin and the setting, in string form.
Mixin that fully implements an IRCPlugin.
Mixes in a module constructor that registers the supplied IRCPlugin subclass to be instantiated on program startup/connect.
Annotation denoting that a variable is the basename of a configuration file or directory.
Aggregate to annotate event handler functions with, to control what they do and how they work.
An aggregate of all variables that make up the common state of plugins.
An entry in registeredPlugins corresponding to a plugin registered to be instantiated on program startup/connect.
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.
Embodies the notion of an event to be replayed, once we know more about a user (meaning after a WHOIS query response).
Annotation denoting that a variable is the basename of a resource file or directory.
Helper struct to aid in testing plugins.
Array of registered plugins, represented by PluginRegistrationEntry/-ies, to be instantiated on program startup/connect.
import kameloso.plugins; import kameloso.plugins.common.mixins.awareness; @(IRCEventHandler() .onEvent(IRCEvent.Type.CHAN) .permissionsRequired(Permissions.anyone) .channelPolicy(ChannelPolicy.home) .addCommand( IRCEventHandler.Command() .word("foo") .policy(PrefixPolicy.prefixed) ) ) void onFoo(FooPlugin plugin, const IRCEvent event) { // ... } mixin UserAwareness; mixin ChannelAwareness; mixin PluginRegistration!FooPlugin; final class FooPlugin : IRCPlugin { // ... mixin IRCPluginImpl; }
Contains the definition of an IRCPlugin and its ancillaries, as well as mixins to fully implement it.
Event handlers can then be module-level functions, annotated with IRCEvent.Types.