User:Petrb/draft
This is a documentation page for wm-bot.
- if you are a user of wm-bot, visit this page: http://meta.wikimedia.org/wiki/wm-bot
This page is for developers of wm-bot, not users, nor administrators, for that we have different pages
Info
WM-Bot is an IRC bot that is running on several wikimedia channels, internal name of project is WMIB (wikimedia irc bot). It's written in c#. Source code can be downloaded from github, but the location changes, try @help in any channel where you see this bot in order to obtain the current url.
History
Wm-bot was originally developed as a replacement for similar infobot we had in #mediawiki. However when I was designing the bot I wanted it to be a bit more different, rather than making something same from scratch, which is kind of pointless idea (if we should have another sw for same purpose, it could be better at least). So the first difference was that unlike previous version, this one was supposed to handle multiple channels from one program instance. So the original design was different from beginning, and that brought some advantages and some caveats. As the development was going on, the bot evolved from simple bot to kernel - modules based application with great possibilities.
Design
WM-Bot is supposed to be lightweight core which can be heavily extended, basically the core is not able to do anything but handle basic administrative commands, such as user management. All features are modules. The bot consist of following layers.
Modules
Every feature of bot is supposed to be a separate module, when you execute @seen or just attempt to parse rss feed, it's done inside of modules. These modules are loaded by core on boot or dynamically. Because they live in same AppDomain it's not possible to unload them. You can only load module, then you can unload it on "application level" which is more like disabling because it's still loaded, just it doesn't do anything.
Core
This handles everything in bot, however it's independent on other layers. Core handles the communication with main IRC server, users and channels.
Bouncer
This is optional feature but we use it on wmf version, so I will consider we are using it. It handles the network connections. Whenever bot core boot up, it connects to IRC network through this separate application.