Is there such a thing as "the" IRC code, I was under the impression it was a protocol not an implementation.
It's both. There are many IRC daemons out there, most of them written in C, thats what the clients connect to. The protocol presented to the client tends to be mostly compatible across implementations, with various minor quirks here and there.
But in any case I think the DCC code would need a major workover.
As far as DCC goes, thats a client side protocol, that really doesn't involved the ircd at all beyond passing the messages between the clients exchange the IP/port info.
Or really any non-text case, today I'd probably go for JSON or XML,
One of the nice things about the IRC protocol itself is that it is rather fast to parse. You can pretty easily parse it with something like strtok(). Given the time period the protocol was designed, speed of parsing is very important. Especially since most IRC daemons single threaded event driven processes.