Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

IRC Client Registration

 ->  means lines that the client sends to the server.
<-   means lines that the server sends to the client.

Normal Registration

Normal registration is sending these commands when you first join the IRC server:

1. CAP LS
2. PASS  (if you want to send one)
3. NICK
4. USER

This works on all servers, those that support CAP and those that don't support CAP.

Normal Registration With CAP

 ->  CAP LS
 ->  NICK dan
 ->  USER username * 0 :This is my realname
<-   CAP * LS :extended-join multi-prefix sasl
 ->  CAP REQ :extended-join multi-prefix
<-   CAP * ACK :extended-join multi-prefix
 ->  CAP END

 ...server sends RPL_WELCOME (001), RPL_ISUPPORT lines (005) and finishes registration...

Normal Registration With NO CAP

 ->  CAP LS
 ->  NICK dan
 ->  USER username * 0 :This is my realname

 ...server sends RPL_WELCOME (001), RPL_ISUPPORT lines (005) and finishes registration...

Broken Registration

This broken registration is sending only CAP LS on connecting and sending PASS/NICK/USER after capability negotiation has finished.

This only works on servers that support CAP, and will fail on servers that don't support CAP.

Broken Registration With CAP

 ->  CAP LS
<-   CAP * LS :extended-join multi-prefix sasl
 ->  CAP REQ :extended-join multi-prefix
<-   CAP * ACK :extended-join multi-prefix
 ->  CAP END
 ->  NICK dan
 ->  USER username * 0 :This is my realname

 ...server sends RPL_WELCOME (001), RPL_ISUPPORT lines (005) and finishes registration...

Broken Registration With NO CAP

 ->  CAP LS
 ...no server response...

 ...some time later, server kills the client for not completing registration...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.