Interface with an IRC server.
Send a private message to a target on the server as an action.
Store data from an individual line received on IRC.
List of all arguments given to this command.
For example, the message "!command arg1 arg2 arg3=val3" will produce the args ["arg1", "arg2", "arg3=val3"]. This is empty if the message was not a command or if it doesn’t have arguments.
Channel the message was sent from.
This will be equal to nick if the message is a private message.
If the message is a command, this is the name of the command used.
See is_command for when a message is considered a command. If it’s not a command, this will be set to None.
Boolean telling whether or not this message is a bot command.
A message is considered a command if and only if it begins with the character "!", ".", or the bot’s name followed by optional punctuation and a space (so EarwigBot: do something, EarwigBot, do something, and EarwigBot do something are all valid).
Dictionary of keyword arguments given to this command.
For example, the message "!command arg1=val1 arg2=val2" will produce the kwargs {"arg1": "val1", "arg2": "val2"}. This is empty if the message was not a command or if it doesn’t have keyword arguments.
Bases: earwigbot.irc.connection.IRCConnection
EarwigBot: IRC Frontend Component
The IRC frontend runs on a normal IRC server and expects users to interact with it and give it commands. Commands are stored as “command classes”, subclasses of Command. All command classes are automatically imported by commands.load() if they are in earwigbot.commands or the bot’s custom command directory (explained in the documentation).
Store data from an event received from our IRC watcher.
Bases: earwigbot.irc.connection.IRCConnection
EarwigBot: IRC Watcher Component
The IRC watcher runs on a wiki recent-changes server and listens for edits. Users cannot interact with this part of the bot. When an event occurs, we run it through some rules stored in our working directory under rules.py, which can result in wiki bot tasks being started or messages being sent to channels on the IRC frontend.