3 ms·
Having written an IRC client and several bots, I actually like the simplicity of the protocol.
by laumars 14y ago
Having written an IRC client and several bots, I actually like the simplicity of the protocol.
- jlgreco 14y agoYeah, the simplicity is a godsend. Lets you pump out a minimally viable client/bot in minutes with whatever language you like, without having to mess around with an existing framework or library.
- sigil 14y agoI'll second that. For example, here's a bot that logs every channel you invite it to...in 50 lines of shell. How big would the equivalent XMPP bot be (libraries included)? https://github.com/acg/logbot/blob/master/bin/logbot.sh https://github.com/acg/logbot/blob/master/bin/logbot.sh
- jlgreco 14y ago50 lines of clean comprehensible shell code even! Written with the traditional code-golfed style of shell scripting I bet you could half that without even trying. ;)
- bonch 14y agoHaving also written a client, I have to disagree that the protocol is simple. The lack of standardized text encoding, the 512 message limit, the desync issue of RPL_NAMREPLY, the hundreds of differences between each network's server behavior, and more make it quite a pain to write a competitive client. It's so bad that the CAP/ACK was protocol was drafted to query the behavior of a server in a standardized way, in addition to RPL_ISUPPORT (which uses the 005 numeric in a way that conflicts with the protocol standard). That's another problem: all the subprotocols grafted onto IRC, especially CTCP which is such a mess that most clients don't implement it completely. Then there's mIRC colors which has parsing ambiguities. Also, the multiple passive DCC request formats. It's a complete mess, and there desperately needs to be a standards body of some sort at the very least collecting all this info in one place for client developers.
- jlgreco 14y ago@bonch (your comment is 'dead') The idiosyncracies that you have to get into when you want to write a proper client for humans, and what you actually have to worry about if your aim is just writing tools that use IRC (internal deployment bots, or whatnot) are miles apart. The vast majority of users will only be interested in the second. Just follow the RFCs for the features that you need, and ignore everything else. Anyway, IRC is plainly simple if you look at it's competition. I can use IRC with netcat without any significant effort; there are not a lot of other things I can say that about.
- bonch 14y agoWell, look at one of my examples: RPL_NAMREPLY, which returns a list of nicknames in the channel, prefixed by channel privilege. One privilege is returned at a time according to the protocol, despite the fact that a user can have multiple privileges at once, such as +vo. If such a user is deopped, your tool won't know that they are +v unless you have taken the steps to gather this state previously (this also means there is a period of time after joining a channel in which you're not in sync with the channel modes the server is seeing). There are extensions to the protocol to support returning multiple privileges in RPL_NAMREPLY, but now your tool has to support both modes of operation. Additionally, the usual medium for discovering these extensions, RPL_ISUPPORT, slightly differs between networks, and today there are now multiple ways to query a server's capabilities, so you have to support RPL_ISUPPORT, PROTOCTL, CAP, and possibly others I haven't seen, and their features overlap. Also, none of these are officially standardized. All this adds up to needless hassle when you're trying to implement a full-featured framework or tool. These are problems that should have been officially addressed years ago so that everyone is on the same page.
- deleted 14y ago[deleted]