irc-bot-ceeswi

Our IRC channel #opencsw on freenode features a bot named 'ceeswi' which is based on the supybot framework. Unfortunately supbot's documentation is a bit sparse, but the implementation (in python) is pretty robust and easily extendable.

The primary incentive to put the bot in place was to forward RSS feed updates from our packaging activities to the channel. This is a standard feature of the supybot RSS plugin. All of the other CSW specific features are implemented via a custom plugin (hosted at SF).

Communicating with the bot

Interaction with the bot is triggered with private query messages or by prefixing messages in the channel with @. The list of commands that the bot understands depends on which plugins the bot has loaded.

CSW commands (delivered by the CSW plugin)

Action Command
List package information pkginfo <package>
List bugs for a package buglist <package>
Explain a GAR variable (taken from the online GAR variable reference) explain <variable>
Search for a file in packages fseach <filename>

… to be continued.

General commands

Action Command
List loaded modules list
List module functions list <module>
Display function usage help <module> <function>
List all configuration variables for a module search <module>
Set a configuration variable config <name> <value> (requires admin privileges)
Identify to the bot (local user database) identify <user> <password>

Setting up your own instance of ceeswi

If you want to extend ceeswi or test-drive its functionality you can easily set up your own, dedicated test instance. Just pick a unique botname and (optionally) a channel that the bot should join. Without a channel you can still communicate with your bot in private, once it is connected to the IRC network.

$ pkgutil -i lxml py_soappy supybot
$ svn checkout https://svn.code.sf.net/p/opencsw/code/opencsw/ircbot
$ cd ircbot
$ ./add-instance.sh <yourbotname> [yourchannelname]
$ supybot <yourbotname>.conf

Please keep in mind that the template config which is used to pre-configure your instance doesn't contain any of the RSS forwarding configuration that our production bot has (in order to not flood our channel). Please use rss add <name> <url> and rss announce add #channel <name> to setup RSS forwarding.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License