Fugiman/jIRCs — pull request #2 by ElementalAlchemist (2012-07-04 02:14:34+00:00)
Title: CAP support

I went all of the (only a tiny bit :r) way out of my way to support this with the names reply, so we should get some use out of it. :P

This commit adds support for the CAP command which allows clients to communicate to the server that they support certain special capabilities (like multi-prefix) so that the server can provide the client with whatever extra features (typically either for convenience, e.g., userhost-in-names, or to address shortcomings in the protocol for which fixes would break the protocol, e.g., multi-prefix).
Currently we only support multi-prefix. Adding additional capabilities (if necessary) should be doable through a minor refactoring of irc_CAP. I figured if we're only going to be supporting one (I can't think of any others we'd need or be able to use), it's better to do it like this, and if we need more, it shouldn't be too hard to change it later.

This request, unlike the last one, also comes with formatting unlike the last one and a minimum of reading my changes after I write them, so you don't have to go back and fix all my typos. (Sorry about that.)