From bfe4e3749b059e1da7abdbe40ba1e3c691faf7fc Mon Sep 17 00:00:00 2001 From: swee Date: Fri, 27 Dec 2024 23:04:55 -0800 Subject: [PATCH] Add doc/formatting.md --- doc/formatting.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/formatting.md diff --git a/doc/formatting.md b/doc/formatting.md new file mode 100644 index 0000000..07345a7 --- /dev/null +++ b/doc/formatting.md @@ -0,0 +1,26 @@ +[⬅️ 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**. + +TLDR: +``` +↗️ PRIVMSG target :content +🔀 :nick!ident@host PRIVMSG target :content +^ Replace nick, ident, host, & target with the respective values described. +↗️ COMMAND arg :content +↙️ :server RPL nick data :content +^ Replace nick with the nickname of the current connection. +``` + + + +> [!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 +> ^ Replace nick with the nickname of the current connection. +> ``` +> For more info on 421, see [Not Found](notfound.md) \ No newline at end of file