Bot module extensions and documentation
First update: the aggregator section.
Second update: added bot_bnc for bonus track
Abstract:
Bot module is a PHP IRC bot written by Morbus Iff. It runs on many Drupal related channels, providing various tools from code documentation to collaboration between users. It utilizes Drupal as its storage and code handling back-end, but until now not many public modules exploit the potential in this website - IRC interaction, interacting with Drupal content, site users for instance. This proposal outlines extending its core in this direction, and writing tests and documentation for it.
Overview:
All code will be written for Drupal 6 compatibility. My project would have the following major tasks:
Core improvements (tests and documentation)
Following the trend started with Drupal core development regarding providing tests for its components and functionality I would document and write tests for bot. Testing new functionality is one of the most difficult tasks during bot related module development, having tests ready will help authors write new bot modules. This task requires the documentation of the Net_SmartIRC class to mimic its behaviour in the tests.
The key to most user centric functionality is to provide a component that can safely identify and match IRC users with Drupal users, so that Drupal's permission system can be used to control the permission levels of IRC users. It also opens the way for other modules to rely on per-user configuration, such as personal notebooks, bookmarking and so on. It is to be implemented in a way that additional modules can easily use the logged in information. I have already done some work in this field (see link), but the code needs to be reviewed, tested and completed.
Bot is often used as a collaborative tool on #drupal (and on other drupal related, developer populated rooms). It already provides a messaging system, factoids to store information, logging and so on. Since many developers are using IRC daily, logged in during work, it would make sense to provide a feed reader component that uses feeds parsed by Drupal core Aggregator and forwards them to IRC, announcing for instance security announcements, or code commits on to the channel (which thanks to authentication could be customizable for each user).
Note: there is an issue with patch (http://drupal.org/node/290761) on this, but a) it is almost a year old, b) it doesn't work as it is now, so at the very least it will need some fixes, documentation.
Since the bot can identify itself to the IRC servers it is logged onto, it can be made OP on most networks. Utilizing the permission control from Drupal and the authentication module I would write a module that makes user with access to such functions issue channel operator commands to the bot, executing operator tasks without themselves actually being one. Configuration will be possible as usual bot configuration page callbacks. A full set of commands to be implemented are listed in related comment on the issue queue, additional commands may be implemented depending on input and time.
Timeline:
I have already mostly finished bot_auth, it needs minor adjustments and review and tests. Overall I expect to proceed fast as I have been working with the module for a while now in my free time, writing small extensions for the bot running on the Hungarian drupal channel (#drupal.hu). I work as Drupal developer part-time during the summer (approximately 20 hours per week) which leaves plenty of time to work on this project.
23rd May - GSoC starts
My exam period finishes before the start, so I can get to work immediately. If the authentication module is not finished until then, I will start the summer finishing it feature wise. I expect to finish this in a week. The next priority is the documentation and test writing. Although the Google timeline suggests that test and documentation at the last week of the GSoC, it is essential part of this proposal. Writing tests will likely be difficult, the used Net_SmartIRC library is not well documented. I expect to spend at least a month doing this, finishing it by end of June.
6th July - Midterm evaluation
Writing tests for the authentication module. Implementing the chanops module and the aggregation module. It is always hard to judge the amount of time required for an unknown task, I would estimate around four weeks for it. The remaining time gives me a safe net in case the testing takes more time as planned, and also new features could be implemented, depending on user input.
Optional things if time allows
bot_bnc
A bouncer is a proxy for the IRC. The bouncer is always present on a given channel, and when user connects to this BNC he or she is transparently connected to the channel as well. There are PHP BNC projects out there, so perhaps an integration would be wise. Charlie Gordon wrote a module that allows users of a Drupal site to talk on IRC through a bot which could be combined with a bot_bnc for transparency.
24th August - Final evaluation
Difficulty: medium
Mentors:
- Morbus
- Dmitri


+1 i can mentor
+1 i can mentor
No problems with that
No problems from me.
nice proposal
I'm marking it as an official idea. Don't forget to add it to the official google site!
Alex Urevick-Ackelsberg
ZivTech: Illuminating Technology
I disagree
the official ideas should not be student ideas. they should be community ideas
Yes, I agree
It makes no sense to list student ideas as "official ideas," I'm not quite sure what alexua was going for... removing the "official ideas" tag from all student ideas now.
Is this really a big enough project?
Is this really a big enough project for Summer of Code? It sounds to me like something that can be done in maybe a week or two... are you sure this is enough to occupy you for the whole summer?
Well
Most new projects take more time than initially thought. I am quite sure that the proper test writing for the bot alone will take more time than a few weeks. However I am open to additional (optional, if time allows) bot project ideas.
For what it's worth, I don't
For what it's worth, I don't see this as being just a week-long thing, even if I were doing them.
I'm a harsh, harsh critic of quality.
For me, one of the more time-consuming efforts is stated as such: SimpleTests. Since the IRC object isn't a normal Drupal thingy at all, we'd have to replicate/subclass it, just to properly handle the tests that would actually test the .module code itself.
Chanops is a whole 'nother can of worms, as I envision it as a whole suite of functionality, not just "kick and ban". Everything one can do via an IRC client, as on operator, should be possible via the module. Setting voices, setting topics, kicking, kick-banning, auto'oping people (something that not every ChanServ provides, which is why the bot should handle it too), undoing all that, etc.
I will agree, I think, that with authentication and aggregator first drafts already done (but unreviewed or provided by other people), we probably /could/ fit a few more design or feature requests in here.
aggregation section re-added
I just realized that as opposed to the first draft I showed to Morbus I did not include the aggregation into the description, its fixed now.
Bot register
The bot should be able to register itself. Currently I need to assume the bot's nick, register and when the verify mail comes I need to re-assume the bot's nick. Instead, it should be possible to supply an email and a password and then the verify code.
Isn't that workflow network
Isn't that workflow network specific? I don't want to make a freenode-only bot.
It is, on quakenet for
It is, on quakenet for instance there is no nickserv. Actually reading their FAQ they dont even have registration to the channel at all as on Freenode.
Having said that I could spend some time to research the differences in the channels, and maybe provide a registration overlay where different network supports could be added.
Not frenode specific
Many networks support registration. Quakenet mgiht not but say lostirc does too.
I'm not adverse to such a
I'm not adverse to such a feature but, in the scheme of things, it only happens once during the lifetime of a bot, and it affects no one but the bot owner. I'd much rather a GSOC project focus on something the entire community can benefit from.
Yes!
This project is already awesome..... Also note Bot Authentication needs some work.
about auth
I know, but if you check the issue you see that I have done already some work on it, module is in my sandbox.
Great idea
This is a great idea for a project, and yes, it would take more than 1 week to code.
geez
Would be nice to select which content types should be announced to irc channels - like blog posts, news stories, forum posts, etc.
Or else have integration with workflow_ng(now rules) so that we could have a "post to irc" action on some triggers or something.
Aggregation is the key
The key to these features is the aggregation integration (and optionally the authentication). Once that groundwork is done it will be very easy to code up something like what you say.