Skip to content

Instantly share code, notes, and snippets.

@DanielOaks
Created October 3, 2017 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save DanielOaks/98ce5874629be1c8607a54957d0143c0 to your computer and use it in GitHub Desktop.
Save DanielOaks/98ce5874629be1c8607a54957d0143c0 to your computer and use it in GitHub Desktop.

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