Skip to content

Declare IRCv3 bot mode (+B) when the network advertises BOT= #1

Closed

Description

@toppk

IRCv3 bot mode is how a bot tells the network it is a bot. The server advertises
BOT=<letter> in RPL_ISUPPORT, the client sets that user mode on itself, and
the server then attaches a bot tag to that user's PRIVMSG/NOTICE for every
recipient that negotiated message-tags. Other bots can then leave it alone
without anybody hand-maintaining an ignore list.

eggbot never claims it. Grepping internal/ finds no BOT=, no +B and no
reference to the mode at all.

What it would take

  1. Read the advertised letter. No parser change is needed:
    ISupport.ApplyTokens (internal/ircx/isupport.go:38) already stores every
    token generically, so Get("BOT") returns it today.
  2. Send MODE <nick> +<letter> once registration is done and the letter is
    known, guarded so it is sent once per connection.

The ordering is the only subtlety: 005 can arrive after 001, so hooking
onWelcome (internal/bot/bot.go:370) alone is not reliable. Attempting the
claim from both the welcome and ISUPPORT paths, with a latch so it fires once,
covers both orders.

Why now

Servers are starting to implement the other half. chonkline shipped it in
iconidentify/chonkline#36, which adds message-tags,
account-tag, the +B user mode and BOT=B in 005, and sends the bot tag
per recipient. On a network like that, a bot which does not set the mode is
indistinguishable from a human to every other well-behaved client.

Recognising the tag on inbound messages is a separate change; filed separately
since each is useful without the other.

Activity

  1. toppk commented on Sep 26, 2026

    @toppk
    Author

    The inbound half is #2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions