Abstract IRC plugin class.
Concrete implementation of a SpecialRequest.
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.
Statically asserts that a parameter storage class is not ref if inFiber, and neither ref nor out if not inFiber.
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.
Evaluates whether or not the message in an event satisfies the PrefixPolicy specified, as fetched from a IRCEventHandler.Command or IRCEventHandler.Regex UDA.
Sanitise event, used upon UTF/Unicode exceptions.
Instantiates a SpecialRequestImpl in the guise of a SpecialRequest with the implicit type T as payload.
Instantiates a SpecialRequestImpl in the guise of a SpecialRequest with the explicit type T as payload.
Sanity-checks a plugin's IRCEventHandlers at compile time.
Embodies the notion of a special request a plugin issues to the main thread.
Mixin that fully implements an IRCPlugin.
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.
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.
import kameloso.plugins.common.core; import kameloso.plugins.common.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 ref IRCEvent event) { // ... } mixin UserAwareness; mixin ChannelAwareness; mixin PluginRegistration!FooPlugin; final class FooPlugin : IRCPlugin { // ... mixin IRCPluginImpl; }
Contains the definition of an IRCPlugin and its ancilliaries, as well as mixins to fully implement it.
Event handlers can then be module-level functions, annotated with IRCEvent.Types.