IRC-Documentation/doc/initial.md

29 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2024-12-27 23:44:00 -08:00
[⬅️ Back to `index`](index.md)
# Initial connection
When a client connect to a server, the server might output:
```
↙️ :server NOTICE * :Checking Ident
↙️ :server NOTICE * :Looking up your hostname...
↙️ :server NOTICE * :Couldn't find your hostname
↙️ :server NOTICE * :No Ident response
```
What the server does is:
1. Check the client's hostname (domain) via an rDNS lookup of the IP address.
2. Try to connect to the client's [Ident server](https://en.wikipedia.org/wiki/Ident_protocol) (if it has one)
2024-12-28 12:38:14 -08:00
And then most clients will send:
```
↗️ NICK nick
↗️ USER nick 0 * :realname
↗️ CAP LS 302
```
1. Set their nickname, server can show an error before connecting so the client can change the nickname before the connection is established.
2. Set their username, modes (mostly unused by the IRCd), and real name
2024-12-28 12:57:29 -08:00
3. Asks the server for [IRCv3 capablities](https://ircv3.net/specs/extensions/capability-negotiation.html) it supports on a specific version (in this case, most clients/servers have version 302)
2024-12-28 12:38:14 -08:00
> [!CAUTION]
2024-12-28 12:40:18 -08:00
> Since the realname can have spaces in it, it must be prefixed with a colon.
2024-12-28 12:56:19 -08:00
> For more info on colon prefixes, see [Colon Prefixing](prefixing.md)