What is pybot?
pybot is a full featured IRC bot written in Python. It was originally developed to integrate many sources of information into IRC channels inside Conectiva, and has evolved into a full featured bot.
End user features
- easy administration through local console;
- may join multiple servers and multiple channels at once (implemented without threads);
- remembers last state, even if killed;
- full online control (just talk to him);
- load, reload and unload modules at runtime;
- flexible user registry, allowing automatic identification and manual identification under different nicks;
- very flexible permission system;
- full online help;
- auto recover from network errors;
- lots of additional functionalities through available modules;
- even basic functionality is implemented using modules;
- random answers, to humanify the bot a little bit;
- persistence implemented with transparent pickling and sqlite database;
- nice API for inter-module communication;
- object oriented;
- hook system for multidispatch with priority setting;
- message priority;
- example modules;
- user registry allows pluggable meta-data;
Current access to its source is available trough CVS only:
% cvs -z3 -d:pserver:email@example.com:/cvsroot/pybot co pybot cvs server: Updating pybot U pybot/ChangeLog U pybot/LICENSE U pybot/README U pybot/TODO U pybot/pybot.conf U pybot/pybot.py (...) % cd pybot % vi pybot.conf (... defaults are usually ok ...) % ./pybot.py -c pybot> pybot> help (...) pybot> pybot> connect to irc.freenode.net with servername freenode and with nick MyBot [MSG] I'm going there! pybot> pybot> pybot> join #conectiva on freenode pybot> [MSG] No problems. pybot> quit (... bot disconnects ...) % ./pybot.py -c (... bot automatically reconnects to freenode ...) pybot> pybot> show channels [MSG] In server freenode, I'm in the following channels: #conectiva pybot> help modules (... check the help and load additional modules ...) pybot> help permissions (... check the help and give some permissions ...) pybot> quit % ./pybot.py &  8528
(*) modules which are part of the basic infrastructure, loaded without user intervention
Takes care of loading, reloading, and unloading modules dynamically and when pybot starts up.
Basic server control. Takes care of initial setup as well as joining and leaving channels on the fly.
Provides access control for pybot. Most of the other modules access exported functions from this module to verify if users have given privilege.
Provides some general user data storage, and exports some functions providing this information for other modules.
Provides online help system.
Provides user access to the global options instance. Also takes care of maintaining persistent variables between runs, if any exists (pickle).
Provides an API allowing modules to be called once in a while.
Answers ping requests, and pings servers from time to time.
Allows searching in logs, and checking what was the last time the bot has seen somebody.
Generic RSS module. It's based on Mark Pilgrim's "ultra liberal" parser, and allows one to send news from any RSS feed to any user/channel/server.
Allows ignoring given users/channels/servers.
Maintains and shows pybot uptime.
Uses external databases to add knowledge to the bot. Each database may add its own trigger, default messages (when the trigger was sucessful, but no keys were found), help, etc. Available infopacks are acronyms (extracted from GNU vera), tcp/udp ports, and airports (both extracted from infobot).
Allow users to leave messages to named users. These messages will be sent when the named user gets into some channel or talks (usefull if he was just away).
Forwards messages between choosen channels and/or servers.
Allows maintaining general shared information about given topics.
Evaluates python expressions in protected environment.
Repeat given message in selected server/channel once, or in given intervals.
Check for new freshmeat releases and post them into selected channels/servers.
Provide simple colaborative locking mechanism (based on a system we used to have in Conectiva, that's why it's filesystem based, and have some specific requirements).
Socialize pybot a little bit.
Simple random number generator.
Provides an API to easily export functions from any module through the XMLRPC protocol, including basic authentication information. Also implements a sendmsg() remote method, allowing external services to send messages and notices using pybot (demo client included);
Allows pybot to acquire knowledge from remote URLs in a very flexible way.
Gustavo Niemeyer <firstname.lastname@example.org>