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.

Members

Classes

AutomodePlugin
class AutomodePlugin

The Automode plugin automatically changes modes of users in channels as per saved definitions.

Functions

applyAutomodes
void applyAutomodes(AutomodePlugin plugin, string channelName, string nickname, string account)

Applies automodes for a specific user in a specific channel.

initResources
void initResources(AutomodePlugin plugin)

Ensures that there is an automodes file, creating one if there isn't.

loadAutomodes
void loadAutomodes(AutomodePlugin plugin)

Loads automode definitions from disk.

modifyAutomode
void modifyAutomode(AutomodePlugin plugin, Flag!"add" add, string nickname, string channelName, string mode)

Modifies an automode entry by adding a new one or removing a (potentially) existing one.

onAccountInfo
void onAccountInfo(AutomodePlugin plugin, IRCEvent event)

Potentially applies an automode, depending on the definitions and the user triggering the function.

onCommandAutomode
void onCommandAutomode(AutomodePlugin plugin, IRCEvent event)

Lists current automodes for a user in the current channel, clears them, or adds new ones depending on the verb passed.

onCommandOp
void onCommandOp(AutomodePlugin plugin, IRCEvent event)

Triggers a WHOIS of the user invoking it with bot commands.

onJoin
void onJoin(AutomodePlugin plugin, IRCEvent event)

Applies automodes upon someone joining a home channel.

onMode
void onMode(AutomodePlugin plugin, IRCEvent event)

Applies automodes in a channel upon being given operator privileges.

onWelcome
void onWelcome(AutomodePlugin plugin)

Populate automodes array after we have successfully logged onto the server.

pruneChannels
void pruneChannels(string[string][string] automodes)

Prunes empty channels in the automodes definitions associative array.

reload
void reload(AutomodePlugin plugin)

Reloads automode definitions from disk.

saveAutomodes
void saveAutomodes(AutomodePlugin plugin)

Saves automode definitions to disk.

selftest
auto selftest(AutomodePlugin _, Selftester s)

Performs self-tests against another bot.

Structs

AutomodeSettings
struct AutomodeSettings

All Automode settings gathered in a struct.

See Also

Meta