Hacker News new | ask | show | jobs
by terminalcommand 2924 days ago
IRC protocol is actually really simple, you just have commands and parameters. AFAIK it is not unusual for IRC servers to implement extra functionalities through bots.

For example to provide authentication many servers provide a bot called NickServ. There could also be a mechanism called ProfileServ that implements these functionalities.

The beauty of IRC is that you can open telnet, connect to an IRC server and actually be able to chat by typing raw commands.

The problem with IRC is that there is no standard specification, and there are many many edge cases. Therefore in my experience most IRC clients implement a small subset of the IRC protocol.

I've been trying to write an irc client in Go for quite some time (https://github.com/terminalcommand/irc-v2). It's been a fun experience, but there is still a lot to cover.

1 comments

> standard specification

RFC 1459

Unfortunately RFC 1459 is just the shallow end. It both includes features that no-one uses anymore, and excludes widely-deployed features that everyone relies on. Lots of the de-facto IRC protocol isn't written down anywhere outside various client and server codebases.

The situation is not unlike that of terminal control sequences. The core VT10x functionality is more-or-less mostly in place, ish, in every terminal emulator, but some of the VT10x functionality is no longer implemented, and lots of subsequent useful functionality isn't well documented, so implementors are left to crib from other implementations.

I believe that https://modern.ircdocs.horse/ documents how the IRC protocol is currently used (and I'm not sure why they chose that particular tld).
Ircdocs.horse is an excellent resource but it is unfortunately not complete.

Irc also has a lot of -to me at least- obscure specifications for example involving channel modes. The functionality differs from server to server.

I have the impression that most irc servers are operated by programs with old codebases coded in C. New client implementations are continuing to get written, but I do not see a lot of server implementations around, probably because it is complicated to write.