Chat bots

Chat is plain IRC (RFC 1459 subset + IRCv3 tags). Any TCP or WebSocket client works.

Endpoints#

TransportEndpointFraming
TCPitzon.tv:6667\r\n-terminated lines, max 512 bytes
WebSocketwss://itzon.tv/ws/ircone IRC line per text frame

Authentication#

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:

PrefixRole
%staff
@channel owner
&bot
+moderator
~VIP
=unverified account
?guest

Tags#

CAP REQ :message-tags echo-message draft/message-redaction before registration, then CAP END.

TagMeaning
msgidstable message id (replies, deletion)
colorsender display color
+reply=<msgid>reply marker; send as client tag to reply
sub-badgesender's cosmetic badge name
partner1 when the sender is a partner
user-id / avatarsender's account id and avatar extension
REDACT linemessage 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#

CommandRankEffect
.whisper <user> <text> / .wanyprivate message
.ban <user> .timeout <user> <min> .unban <user>modmoderation
.delete <msgid>moddelete message
.pin <msgid> .unpin [msgid]modpins
.mod .unmod .vip .unvip <user>ownerroles

Bots get mod rank only via .mod from the channel owner.

Limits#

LimitValue
Line length512 bytes incl. \r\n, longer is truncated
Message rate~2/s below mod rank, excess dropped with NOTICE
Connections8 per account, oldest evicted
Contentautomod filters slurs server-side
WS close codes4400 flood 4401 ping timeout 4402 queue overflow 4403 auth revoked