Chat bots
Chat is plain IRC (RFC 1459 subset + IRCv3 tags). Any TCP or WebSocket client works.
Endpoints#
| Transport | Endpoint | Framing |
|---|---|---|
| TCP | itzon.tv:6667 | \r\n-terminated lines, max 512 bytes |
| WebSocket | wss://itzon.tv/ws/irc | one IRC line per text frame |
Authentication#
- Generate a token here.
- Tokens do not expire. Rotating the token or an account suspension revokes access within 90 seconds.
- The token grants chat access only, nothing else.
- Send
PASS <token>as the first command. The server assigns your account name and ignores whateverNICKyou send. - Connections without
PASSare read-only guests and cannot send messages.
Example session#
Server lines start with : or PING.
PASS <token>
NICK bot
USER bot 0 * :bot
:server 001 mybot :Welcome
JOIN #streamer
:mybot!mybot@host JOIN #streamer
PRIVMSG #streamer :hello chat
:go-irc PING go-irc
PONG :go-irc
Unanswered PING disconnects after 90 s.
Receiving#
:alice!alice@host PRIVMSG #streamer :hello everyone
:alice!alice@host PRIVMSG #streamer hi
:go-irc PING go-irc
The leading : on the trailing parameter is omitted when it contains no spaces,
and PING may arrive with a server prefix; parse both forms.
Joining a channel delivers the member list (353/366), a replay of the last
10 messages, and any pinned messages. Each name in the 353 list carries a role prefix:
| Prefix | Role |
|---|---|
% | staff |
@ | channel owner |
& | bot |
+ | moderator |
~ | VIP |
= | unverified account |
? | guest |
Tags#
CAP REQ :message-tags echo-message draft/message-redaction before registration, then CAP END.
| Tag | Meaning |
|---|---|
msgid | stable message id (replies, deletion) |
color | sender display color |
+reply=<msgid> | reply marker; send as client tag to reply |
sub-badge | sender's cosmetic badge name |
partner | 1 when the sender is a partner |
user-id / avatar | sender's account id and avatar extension |
REDACT line | message deleted; drop it from logs |
With message-tags negotiated, the same metadata tags also ride JOIN
broadcasts, and on joining a channel you receive one META <channel> <nick>
line per member that carries metadata. New metadata appears as additional tags over time; parse
what you know and ignore the rest.
Commands#
| Command | Rank | Effect |
|---|---|---|
.whisper <user> <text> / .w | any | private message |
.ban <user> .timeout <user> <min> .unban <user> | mod | moderation |
.delete <msgid> | mod | delete message |
.pin <msgid> .unpin [msgid] | mod | pins |
.mod .unmod .vip .unvip <user> | owner | roles |
Bots get mod rank only via .mod from the channel owner.
Limits#
| Limit | Value |
|---|---|
| Line length | 512 bytes incl. \r\n, longer is truncated |
| Message rate | ~2/s below mod rank, excess dropped with NOTICE |
| Connections | 8 per account, oldest evicted |
| Content | automod filters slurs server-side |
| WS close codes | 4400 flood 4401 ping timeout 4402 queue overflow 4403 auth revoked |
