2024-12-28 12:44:53 -08:00
|
|
|
[⬅️ Back to `index`](index.md)
|
|
|
|
|
|
|
|
# Colon prefixing
|
|
|
|
|
|
|
|
In some commands (like PRIVMSG, TOPIC, USER, NOTICE, etc), the client needs to add a colon before the content (NOT after the command)
|
|
|
|
|
|
|
|
❌ Your client shouldn't do this:
|
|
|
|
```
|
|
|
|
↗️ PRIVMSG foo this is a very cool message
|
|
|
|
🔀 nick!ident@host PRIVMSG foo :this
|
|
|
|
```
|
2024-12-28 12:50:13 -08:00
|
|
|
The server will only detect the first word
|
|
|
|
|
|
|
|
|
|
|
|
❌ Your client shouldn't do this either:
|
|
|
|
```
|
|
|
|
↗️ PRIVMSG foo: this is a very cool message
|
|
|
|
↙️ :server 401 nick foo: :No such nick/channel
|
|
|
|
```
|
2024-12-28 13:18:12 -08:00
|
|
|
The server will think that the target (or whatever is before the content) ends with a colon.
|
|
|
|
For more info on error 401, see [No such nick/channel](nosuchnick.md)
|
2024-12-28 12:50:13 -08:00
|
|
|
|
|
|
|
|
2024-12-28 12:44:53 -08:00
|
|
|
✅ Here's what it should do:
|
|
|
|
```
|
|
|
|
↗️ PRIVMSG foo :this is a very cool message
|
|
|
|
🔀 nick!ident@host PRIVMSG foo :this is a very cool message
|
2024-12-28 12:58:42 -08:00
|
|
|
```
|
|
|
|
Your client should be able to parse the colon out.
|
|
|
|
```
|
|
|
|
<nick> this is a very cool message
|
2024-12-28 12:44:53 -08:00
|
|
|
```
|