Anyway, a real version of this would have a header of "AOL IM" instead of "aolim", and the full set of links like in userinfo.bml instead of just the (unquoted, too) account name. But I'm not going to just copy the code.
I figure we need a few functions to organize this. We'd want LJ::im_service_list, which returns a list of 'aolim', 'jabber', etc. Then there's LJ::im_service_name($service), which maps 'aolim' onto 'AOL IM' (also to be used as the label in userinfo.bml). And then there would be LJ::im_service_link($service, $id), which returns some HTML that marks up the user ID for putting into userinfo.bml, imlist.bml, etc. I'd also update all other code that deals with IM services.
So, questions. First of all, names: are these good names for the functions? Am I missing others? Is imlist.bml a good name? Where do I put these functions: in ljlib.pl? I'd probably make it mostly data-driven, so where do I put the table? Right next to the function or at the top of the file or somewhere else?
Also, is there an lj_dev IRC or other chat place? I keep having minor questions (cvsreport -d doesn't seem to work with newly created files, say) that I don't really want to have to post here.
OK, patch number two: a patch to ljlib.pl and also a new imlist.bml (I can't figure out how to get cvsreport.pl to deal with new files. If we're going down this road, though, we'd want to convert most code that deals with IM services to using this.