- create an IRC client for communicating to servers+channels
- create a message server running on local host
- process/parse data from the local server to the IRC client (i.e., appropriate IRC channel)
Turns out radix did just so earlier this year for Canonical, as he relates in this blog post. This is exactly what I needed this weekend while migrating my old IRC bot to a new server. Well, almost all I needed. There were a couple features I wanted to add...
Not having worked with bzr or launchpad much, I asked radix about branching his code, since I heard that Canonical actually provides developers a way of doing that without leaving the launchpad environment of trunk. His instructions were quite simple, and I summarize them here for the benefit of others:
- find the project you want to branch on launchpad
- checkout trunk (if that's what you're branching)
- commit (a local action) with a message about this being a new branch
- make your changes (with any number of commits)
- push all your commits to your branch on launchpad
Here are the bzr commands that I used:
bzr branch http://bazaar.launchpad.net/~radix/publish-bot/trunk publish-logger-botThe changes I committed:
bzr commit --unchanged -m "Created branch of radix's publish-bot."
bzr push sftp://email@example.com/~oubiwann/publish-bot/publish-logger-bot
- enabled logging
- added log-rotation
- added an HTTP service for browsing the log files
- a search form for the log files
- a parser for bot commands, thus enabling human -> bot communications (will probably dust off my old pyparsing code for this)
- arbitrary time log rotation (currently it's by day, ad midnight)
And for dessert:
[18-Aug-2007 17:56:50] [connected at Sat Aug 18 17:56:50 2007]
[18-Aug-2007 17:57:00] [wallflower (logger bot) has joined #supersecretchannel]
[18-Aug-2007 18:00:38] <keturn> what's a wallflower?
[18-Aug-2007 18:20:09] <PenguinOfDoom> It's a flower that grows out of a wall
[18-Aug-2007 18:20:52] <keturn> and has an irc client?
[18-Aug-2007 18:22:49] <keturn> is it related to an oubiwann?
[18-Aug-2007 18:34:00] <exarkun> I reckon it is