Re:IRC turns thirty
by sbjs on Friday August 24, 2018 @12:27AM
(#17832798)
I tried it before and it's not as easy as it sounds. There is no one spec, it's a handful of RFCs and other ad hoc extensions that are barely documented anywhere. I think there's at least a dozen different documents you have to refer to.
[ Parent
| on HN ]
For most of the client protocol, it's just RFC 1459 and RFC 2812. Then there's CTCP, DCC, server-to-server protocols and the 005 numeric.
I'm not sure you need any of these for communicating via telnet or writing a small bot that will answer back.
Each of the big servers implement their own extensions, or share some extensions but not others. All poorly recorded in many documents across the Web.
To have a modern irc client, it is far from a clean protocol. If you just want the basics, it will still connect and send messages.
Re:IRC turns thirty
by quietbritishjim on Friday August 24, 2018 @02:17AM
(#17833130)
I tried to implement an IRC client in about 2004 and no popular server was implementing RFC 2812, which was released in 2000. I realise that's a long time ago but things move slowly in the IRC world, so I would be surprised if things had changed a lot since then.
RFC2812 was codifying one particular network's protocol choices and was never accepted by the wider community of IRC server and client developers.
There have been widely implemented improvements (eg RPL_ISUPPORT / 005) which succeeded by discussion and consensus rather than trying to lay down a new standard by fiat.
Yes, you can definitely connect manually through telnet (I did it back in the old days). The only problem is it will not stay connected too much, because you should also reply to server's PINGs at regular time intervals otherwise you'll get disconnected.
With most servers you don't actually have to specifically reply to the PINGs, just sending something regularly should keep you connected.
Re:IRC turns thirty
by mindslight on Friday August 24, 2018 @12:42AM
(#17832846)
I've toyed with many protocols via reading RFCs, but in this case just run tcpdump on an existing client and you'll be set.
Some people already did a good job at making libs and tools to easily interact with IRC: libircclient [1] and the irctk [2] wrapper around it comes to mind. Using irctk it's remarkably easy to write an IRC bot that does whatever you want.
I've written several basic IRC clients and bots over the years. Compared to XMPP, and other newer proprietary protocols it is actually quite simple.
Hardly anyone uses the DCC file transfer stuff anymore, so other than encryption, all you really need to handle is channel messages and private messages, plus the management commands (ops, voice, mute etc).