From 446235c36e11e5cb4b0dc0e140849748185db000 Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Tue, 26 Apr 2022 17:53:17 +0200 Subject: [PATCH] Ratify bot-mode (#495) Co-authored-by: James Wheare --- extensions/bot-mode.md | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/extensions/bot-mode.md b/extensions/bot-mode.md index 8a3afd38..65efb9f6 100644 --- a/extensions/bot-mode.md +++ b/extensions/bot-mode.md @@ -1,7 +1,6 @@ --- title: Bot Mode layout: spec -work-in-progress: true meta-description: A user mode that indicates a user is a bot. copyrights: - @@ -10,19 +9,11 @@ copyrights: email: "daniel@danieloaks.net" --- -## Notes for implementing work-in-progress version - -This is a work-in-progress specification. - -Software implementing this work-in-progress specification MUST NOT use the -unprefixed `bot` tag name. Instead, implementations SHOULD use the -`draft/bot` tag name to be interoperable with other software -implementing a compatible work-in-progress version. - -The final version of the specification will use an unprefixed tag name. - ## Introduction -This is a standardised mode that lets clients mark themselves as bots, and lets other clients see them as bots. +This specification defines a standardised mechanism to allow clients to mark themselves as bots. + +## Motivation +This functionality was previously implemented by several IRC servers in independent ways using fixed mode letters and conflicting WHOIS numerics. This specification seeks to standardise the functionality, adding a message tag for increased visibility of bot status and an ISUPPORT token to allow for more flexible implementations. ## The `BOT` ISUPPORT token Servers publishing the `BOT` [ISUPPORT](https://modern.ircdocs.horse/#feature-advertisement) token let clients mark themselves as bots by setting a user mode. The value of the `BOT` token is the mode character which is used to enable bot mode and is also the flag used in `WHO` responses of bots (e.g. `BOT=B` or `BOT=b`). @@ -40,8 +31,8 @@ Like other WHOIS reply numerics, `` is the nick of the sender, `` ## The `WHO` bot flag When a `RPL_WHOREPLY` `(352)` numeric is returned for a bot, the character used as the value of the ISUPPORT `BOT` token is returned in the flags (alongside `H|G`). -## The `draft/bot` tag -The `draft/bot` tag indicates that the given user is a bot. This tag SHOULD be added by the server to all commands sent by a bot (e.g. `PRIVMSG`, `JOIN`, `MODE`, `NOTICE`, and all others). The tag SHOULD also be added by the ircd to all numerics directly caused by the bot. This tag MUST only be sent to users who have requested the `message-tags` capability. Servers MUST NOT send this tag with a value, and clients MUST ignore any value if it exists. +## The `bot` tag +The `bot` tag indicates that the given user is a bot. This tag SHOULD be added by the server to all commands sent by a bot (e.g. `PRIVMSG`, `JOIN`, `MODE`, `NOTICE`, and all others). The tag SHOULD also be added by the ircd to all numerics directly caused by the bot. This tag MUST only be sent to users who have requested the `message-tags` capability. Servers MUST NOT send this tag with a value, and clients MUST ignore any value if it exists. ## Examples @@ -78,10 +69,10 @@ Server: :irc.ircv3.net 352 alice #chat ~u 198.51.100.103 irc.ircv3.net alice H : Server: :irc.ircv3.net 352 alice #chat ~u 203.0.113.22 irc.ircv3.net robodan Hb :0 Hi, I'm a bot! Server: :irc.ircv3.net 315 alice #chat :End of WHO list [ ... ] -Server: @draft/bot :robodan!~u@203.0.113.22 PRIVMSG #chat :Hello! Try typing .help to see my commands! +Server: @bot :robodan!~u@203.0.113.22 PRIVMSG #chat :Hello! Try typing .help to see my commands! ``` -Example of some future value being sent, which the receiving client will ignore and process as a bare `@draft/bot` tag: +Example of some future value being sent, which the receiving client will ignore and process as a bare `@bot` tag: ``` -Server: @draft/bot=someFutureValueHere=2343 :robodan!~u@203.0.113.22 PRIVMSG #chat :Hello! Try typing .help to see my commands! +Server: @bot=someFutureValueHere=2343 :robodan!~u@203.0.113.22 PRIVMSG #chat :Hello! Try typing .help to see my commands! ```