Skip to content
Help Center
Home / Help Center / I'm a developer

CR-Avatar for IRC client authors

A short checklist for showing avatars without flooding anyone.

Full rules: the specification. This is the order to do things in.

  1. Detect. Turn avatars on when the 005 line has CR-AVATAR (keep the number, never refuse an unknown one) or when any /whois returns a 320 line has an avatar set: <emoji> [:name:]. Turn them off, clear everything and stop lookups on -CR-AVATAR, and stay off until a later CR-AVATAR=<n>. Never decide by the address the person typed, a vhost or the server name: many people connect through a bouncer.
  2. Ask for the capability conferencerooms.org/avatar when the server lists it.
  3. Read AVATAR messages. :nick!user@host AVATAR <emoji> [<name>] sets or replaces; AVATAR * clears. A value is valid if it is at most 16 UTF-8 bytes with no whitespace or control characters; otherwise ignore it and keep the old one. Accept any order. A QUIT drops the entry and a NICK moves it.
  4. With the capability active, send no lookups at all.
  5. Without the capability (a bouncer, an older ircd): be polite. Quiet WHOIS lookups, one per person, at most one every three seconds, only on spare capacity (never queue behind the person's own commands), newest joiners and speakers first, silent (print nothing), remembered until the person quits. A WHOIS the person types must always leave at once and always show.
  6. Count lookups per nick, and show only answers you asked for: a bouncer such as ZNC sends every connected device the answers to every device's WHOIS.
  7. Show it: user list (between the mode badge and the nick), chat (before the sender's nick), /whois (<nick> has an avatar set: <emoji> :<name>:). Nothing for no avatar, an unsupported network, the operator badge text or an invalid value. Keep the whole emoji sequence (variation selectors, joiners).
  8. Apply changes in batches so a burst of answers redraws once, not once per person.

Textce (Mac, iPhone, Windows) is a working reference client and has a /avatars command that shows how avatars work on a connection. See also the ircd module and services notes.

Say hi in #CR.

Support Room

Ask HelpServ.

Type /hs in any room for help on every command.

Open the Web Chat