IRC-Documentation/doc/formatting.md

23 lines
778 B
Markdown
Raw Normal View History

2024-12-27 23:04:55 -08:00
[⬅️ Back to `index`](index.md)
# Formatting of socket
IRC is quite a hassle to understand, so the first thing to know about the protocol is the **socket** and **server/client**.
2024-12-27 23:28:17 -08:00
It's quite simple on client-side, but server-side has to supply more info:
2024-12-27 23:04:55 -08:00
```
2024-12-27 23:34:25 -08:00
↗️ PRIVMSG foo :content
🔀 :nick!ident@host PRIVMSG foo :content
2024-12-27 23:04:55 -08:00
↗️ COMMAND arg :content
↙️ :server RPL nick data :content
```
> [!CAUTION]
> If the command has content, the colon MUST be included, and is at the beginning of the content, not the end of the command/args.
> ```
> ↗️ COMMAND: content
> ↙️ :server 421 nick COMMAND: :Unknown command
> ```
2024-12-28 13:17:42 -08:00
> For more info on colon prefixes, see [Colon Prefixing](prefixing.md)
> For more info on error 421, see [Unknown Command](notfound.md)