-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: James Wheare <[email protected]>
- Loading branch information
Showing
1 changed file
with
9 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: "[email protected]" | ||
--- | ||
|
||
## 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, `<nick>` is the nick of the sender, `<target>` | |
## 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 :[email protected] PRIVMSG #chat :Hello! Try typing .help to see my commands! | ||
Server: @bot :[email protected] 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 :[email protected] PRIVMSG #chat :Hello! Try typing .help to see my commands! | ||
Server: @bot=someFutureValueHere=2343 :[email protected] PRIVMSG #chat :Hello! Try typing .help to see my commands! | ||
``` |