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.

It also offers some less debug-y, more administrative functions, like adding and removing homes on-the-fly, whitelisting or de-whitelisting account names, adding/removing from the operator/staff lists, joining or leaving channels, and such.

Modules

classifiers
module kameloso.plugins.admin.classifiers

Implementation of Admin plugin functionality regarding user classifiers. For internal use.

debugging
module kameloso.plugins.admin.debugging

Implementation of Admin plugin functionality that borders on debugging. For internal use.

Members

Classes

AdminPlugin
class AdminPlugin

The Admin plugin is a plugin aimed for administrative use and debugging.

Functions

addChannel
void addChannel(AdminPlugin plugin, IRCEvent event, string rawChannel, Flag!"home" addAsHome)

Adds a channel to the list of currently active home or guest channels, to the IRCBot.homeChannels and IRCBot.guestChannels arrays of the current AdminPlugin's IRCPluginState, respectively.

cycle
void cycle(AdminPlugin plugin, string channelName, Duration delay_, string key)

Implementation of cycling, called by onCommandCycle.

delChannel
void delChannel(AdminPlugin plugin, IRCEvent event, string rawChannel, Flag!"home" delFromHomes)

Removes a channel from the list of currently active home or guest channels, from the IRCBot.homeChannels and IRCBot.guestChannels arrays of the current AdminPlugin's IRCPluginState, respectively.

initialise
void initialise(AdminPlugin plugin)

Populates the array of what incoming types to prettyprint to the local terminal.

listHostmaskDefinitions
void listHostmaskDefinitions(AdminPlugin plugin, IRCEvent event)

Lists existing hostmask definitions.

onAnyEvent
void onAnyEvent(AdminPlugin plugin, IRCEvent event)

Prints incoming events to the local terminal, in forms depending on which flags have been set with bot commands.

onBusMessage
void onBusMessage(AdminPlugin plugin, string header, Sendable content)

Receives a passed Boxed instance with the "admin" header, and calls functions based on the payload message.

onCommandAuth
void onCommandAuth(AdminPlugin plugin)

Asks the ConnectService to (re-)authenticate to services.

onCommandBlacklist
void onCommandBlacklist(AdminPlugin plugin, IRCEvent event)

Adds a nickname to the list of users who may not trigger the bot whatsoever, except on actions annotated Permissions.ignore.

onCommandBus
void onCommandBus(AdminPlugin plugin, IRCEvent event)

Sends an internal bus message to other plugins, much like how such can be sent with the Pipeline plugin.

onCommandCycle
void onCommandCycle(AdminPlugin plugin, IRCEvent event)

Cycles (parts and immediately rejoins) a channel.

onCommandElevated
void onCommandElevated(AdminPlugin plugin, IRCEvent event)

Adds a nickname to the list of users who may trigger the bot, to the current list of IRCClient.Class.elevated users of the current AdminPlugin's IRCPluginState.

onCommandFake
void onCommandFake(AdminPlugin plugin, IRCEvent event)

Fakes a string as having been sent by the server.

onCommandGet
void onCommandGet(AdminPlugin plugin, IRCEvent event)

Fetches a setting of a given plugin, or a list of all settings of a given plugin if no setting name supplied.

onCommandGuest
void onCommandGuest(AdminPlugin plugin, IRCEvent event)

Adds or removes channels to/from the list of currently active guest channels, in the IRCBot.guestChannels array of the current AdminPlugin's IRCPluginState.

onCommandHome
void onCommandHome(AdminPlugin plugin, IRCEvent event)

Adds or removes channels to/from the list of currently active home channels, in the IRCBot.homeChannels array of the current AdminPlugin's IRCPluginState.

onCommandJoin
void onCommandJoin(AdminPlugin plugin, IRCEvent event)

Joins a supplied channel temporarily, without recording as neither a home nor as a guest channel.

onCommandMask
void onCommandMask(AdminPlugin plugin, IRCEvent event)

Adds, removes or lists hostmasks used to identify users on servers that don't employ services.

onCommandOperator
void onCommandOperator(AdminPlugin plugin, IRCEvent event)

Adds a nickname or account to the list of users who may trigger lower-level functions of the bot, without being a full admin.

onCommandPart
void onCommandPart(AdminPlugin plugin, IRCEvent event)

Parts a supplied channel.

onCommandPrintBytes
void onCommandPrintBytes(AdminPlugin plugin, IRCEvent event)

Toggles a flag to print all incoming events *as individual bytes*.

onCommandPrintEvents
void onCommandPrintEvents(AdminPlugin plugin, IRCEvent event)

Toggles a flag to prettyprint all incoming events, using kameloso.prettyprint.prettyprint.

onCommandPrintRaw
void onCommandPrintRaw(AdminPlugin plugin, IRCEvent event)

Toggles a flag to print all incoming events *raw*.

onCommandQuit
void onCommandQuit(AdminPlugin plugin, IRCEvent event)

Sends a IRCEvent.Type.QUIT event to the server.

onCommandReconnect
void onCommandReconnect(AdminPlugin plugin, IRCEvent event)

Disconnect from and immediately reconnects to the server.

onCommandReexec
void onCommandReexec(AdminPlugin plugin, IRCEvent event)

Re-executes the program.

onCommandReload
void onCommandReload(AdminPlugin plugin, IRCEvent event)

Asks plugins to reload their resources and/or configuration as they see fit.

onCommandSave
void onCommandSave(AdminPlugin plugin, IRCEvent event)

Saves current configuration to disk.

onCommandSelftest
void onCommandSelftest(AdminPlugin plugin, IRCEvent event)

Performs self-tests against another bot.

onCommandSet
void onCommandSet(AdminPlugin plugin, IRCEvent event)

Sets a plugin option by variable string name.

onCommandShowUser
void onCommandShowUser(AdminPlugin plugin, IRCEvent event)

Prints the details of one or more specific, supplied users to the local terminal.

onCommandShowUsers
void onCommandShowUsers(AdminPlugin plugin)

Prints out the current users array of the AdminPlugin's IRCPluginState to the local terminal.

onCommandStaff
void onCommandStaff(AdminPlugin plugin, IRCEvent event)

Adds a nickname or account to the list of users who may trigger even lower level functions of the bot, without being a full admin. This roughly corresponds to channel owners.

onCommandSudo
void onCommandSudo(AdminPlugin plugin, IRCEvent event)

Sends supplied text to the server, verbatim.

onCommandSummary
void onCommandSummary(AdminPlugin plugin)

Causes a connection summary to be printed to the terminal.

onCommandWhitelist
void onCommandWhitelist(AdminPlugin plugin, IRCEvent event)

Adds a nickname to the list of users who may trigger the bot, to the current IRCClient.Class.whitelist of the current AdminPlugin's IRCPluginState.

onCommandWhoami
void onCommandWhoami(AdminPlugin plugin, IRCEvent event)

Sends what we know of the inquiring user.

parseTypesFromString
auto parseTypesFromString(AdminPlugin plugin, string definitions)

Modifies eventTypesToPrint based on a string of comma-separated event types.

selftest
auto selftest(AdminPlugin _, Selftester s)

Performs self-tests against another bot.

Manifest constants

omniscientChannelPolicy
enum omniscientChannelPolicy;

The ChannelPolicy to mix in awareness with depending on whether version OmniscientAdmin is set or not.

Structs

AdminSettings
struct AdminSettings

All Admin plugin settings, gathered in a struct.

See Also

Meta