Skip to content
PRIVMSG, NOTICE, CTCP
step 1/5

Reading — step 1 of 5

Read

~1 min readChannels & Messaging

PRIVMSG, NOTICE, CTCP

Send a message:

C: PRIVMSG #general :Hello everyone
S: :alice!a@host PRIVMSG #general :Hello everyone   (relay to other clients in #general)

Or to a user:

C: PRIVMSG bob :Hi privately
S: :alice!a@host PRIVMSG bob :Hi privately   (only bob receives)

NOTICE is similar but:

  • Clients should NOT auto-respond (no bots replying to NOTICE).
  • Used for status messages, server announcements, services bots.

Length limits:

  • Lines: 512 bytes total INCLUDING CRLF.
  • Long messages: client splits before send.
  • Nicknames: 9 chars (RFC); modern networks 30+.

CTCP (Client-to-Client Protocol): special PRIVMSG/NOTICE with \x01 markers:

PRIVMSG bob :\x01ACTION waves\x01

Renders as "* alice waves".

Common CTCPs:

  • ACTION: /me command.
  • VERSION: ask client version.
  • TIME: client time.
  • PING: roundtrip latency.
  • DCC SEND: file transfer (direct connection between clients).

DCC (Direct Client Connection): out-of-band TCP between clients for file transfer or 1:1 chat. Bypasses server.

Echoing: server does NOT echo your message back to you (unless echo-message capability negotiated). Local client must display its own outgoing.

Server replies to PRIVMSG:

  • 401 ERR_NOSUCHNICK: target doesn't exist.
  • 404 ERR_CANNOTSENDTOCHAN: not in channel, or channel +n.
  • Otherwise: silently relay.

Channel modes affecting messages:

  • +n: only members can speak.
  • +m: only voiced + ops can speak.
  • +M: only registered users.
  • Auto-rate-limit on flood.

NickServ messages: send PRIVMSG to NickServ for account management — PRIVMSG NickServ :IDENTIFY mypassword. Modern: SASL during registration.

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…