From 992916e7892db4a688d107760c8a3bcb1f74aaf1 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Tue, 12 Apr 2022 22:26:35 +0200 Subject: [PATCH 1/2] Ratify bot-mode --- extensions/bot-mode.md | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/extensions/bot-mode.md b/extensions/bot-mode.md index 8a3afd38..e3feff9e 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,17 +9,6 @@ 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. @@ -40,8 +28,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 +66,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! ``` From e226f442d553e8c9cc42f9f4d6439be77e85a3ff Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Tue, 26 Apr 2022 17:50:54 +0200 Subject: [PATCH 2/2] Improve introduction and motivation Co-authored-by: James Wheare --- extensions/bot-mode.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/bot-mode.md b/extensions/bot-mode.md index e3feff9e..65efb9f6 100644 --- a/extensions/bot-mode.md +++ b/extensions/bot-mode.md @@ -10,7 +10,10 @@ copyrights: --- ## 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`).