MKbot
Summary
MKbot is a modular IRC bot written in C++, using the Qt 4 toolkit. It currently works on networks running hybrid-ircd such as Freenode, and the unreal3 ircd.
Key features
- Fast
- Plugins can be loaded, unloaded, and reloaded at runtime from .so files
- Simple architecture for making new plugins
- Consistent command format
- Identification via nickserv
Where to download
| MKbot-0.2 | Initial release | |
| MKbot-0.3 | 0.2->0.3 patch | Fixed a major bug in the tells plugin |
Quick-start
Firstly, install Qt 4 if you haven't already. Once you have Qt 4 installed, download the MKbot source, and extract it (tar jxfv mkbot-$VERSION.tar.bz2).
Go into the created directory (MKbot-$VERSION), and type:
qmake
make
"make" may take a long time.
Once it is completed,type "./launch" and the bot should launch, asking you some essential configuration questions (this will only happen the first time). If it complains about missing libraries, hit ctrl-c to kill the script, and uncomment and edit the LD_LIBRARY_PATH line in launch to point to the path where your Qt 4 libaries are stored.
On a fresh install, the bot will not join any channels, and only has the config, security, and pluginLoader plugins loaded. You will probably want to load the admin and help plugins by sending the following in a private message to the bot:
security.auth
pluginloader.load help
pluginloader.load admin
You will also want to change the access rules very quickly:
security.grant your-username-here // //
security.revoke // // //
See Help.Help for information on the above commands and plugins. All commands are of the form <plugin>.<command>, however one-word short versions can be made with the aliases plugin; load it and see help.help aliases for more information.
Included plugins
- Admin - handles various administrative functions, such as joining channels etc
- Aliases - allows creation of one-word short versions of commands
- Config - the bot's configuration system
- Freenode - stops the bot excess flooding on the Freenode IRC network
- Help - the bot's help system
- Karma - associated a score with words/quoted phrases
- Parrot - repeats exactly what it's told to - useful for identifying to nickserv
- PluginLoader - allows the run-time loading, unloading, and reloading of plugins
- Quotes - stores and scores quotes
- Security - manages user permissions within the bot
- Tells - allows users to send messages to each other
Architecture
Header files defining the interface:
- include/coreinterface.h
- include/plugininterface.h
- include/commandinterface.h
Loading plugins
- Core loads plugin.so file
- Core calls "getObject(CoreInterface*)" method in plugin to get a pointer to an object implementing PluginInterface
- In it's constructor, the plugin calls '(CoreInterface*)->registerCommand(this, "command", CommandInterface*)'. (Each command is implemented as a class implementing CommandInterface.
Runtime
- Core parses each message
- Core calls the "go" method in the appropriate CommandInterface object









