-
Notifications
You must be signed in to change notification settings - Fork 1
Overall Design
This page describes the most important classes and how they interact.
This class handles the connection to the IRC network. Converts messages sent via the IRC protocol and creates corresponding MelanoBotCommand instances. Sends IRC messages and commands.
Contains information retrieved from IRC. The most important data members are cmd and params. If the bot has been addressed directly cmd will be the first word after the bot nick, and it's intended to be interpreted as a user explicitly issuing a command to the bot. Params contain the rest of the message as an array, each word as a separate element. If the bot hasn't been addressed directly, cmd is null.
A simple unit that takes a single MelanoBotCommand and does something with it. Every functionality visible by the end user is implemented as a CommandExecutor.
Contains a collection of CommandExecutor. It represents a set of features connected to a set of channels. Different executors allow the bot to have different behaviors on different channels. Dispatcher attached to common channels can be disambiguated with by assigning them a different prefix.
Uses a MelanoBot instance to get MelanoBotCommand. Performs the main loop of the bot script and assign each MelanoBotCommand to the correct BotCommandDispatcher.
Shared data owned by the BotDriver. Can by dispatchers and executors.
Low level class which sends and receive message from a rcon server.
Connects IRC to Rcon. It's a dispatcher, as such it can receive commands from IRC and forward them to Rcon. It's also an external communicator, meaning that it can retrieve information from rcon and make it available to the IRC classes.