-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display name client tag spec #452
Open
jwheare
wants to merge
4
commits into
ircv3:master
Choose a base branch
from
jwheare:display-name
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7bea4e4
[display-name] display-name client tag spec
jwheare ddcb4b7
Mention formatting codes and ZWSP. Make fallback string handling more…
jwheare e9ba5aa
Add example with colour codes and zwsp. Remove regex, style edits
jwheare 165a133
(bot)
jwheare File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
title: "`display-name` client tag" | ||
layout: spec | ||
work-in-progress: true | ||
copyrights: | ||
- | ||
name: "James Wheare" | ||
period: "2021" | ||
email: "james@irccloud.com" | ||
--- | ||
|
||
## 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 `+display-name` tag name. Instead, implementations SHOULD use the | ||
`+draft/display-name` 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 specification defines a client-only message tag to indicate a display name to use for the attached message, separate from the nickname or realname of the user. | ||
|
||
## Motivation | ||
|
||
This tag provides a way to provide further temporary context about the originator of a message. Example use cases include bots that relay messages from external contexts, or in role playing environments. | ||
|
||
## Architecture | ||
|
||
For the purpose of this specification, a message is defined as a `PRIVMSG`, `NOTICE`, `TAGMSG`, or [`batch`][batch] end. | ||
|
||
### Dependencies | ||
|
||
Clients wishing to use this tag MUST negotiate the [`message-tags`][tags] capability with the server. | ||
|
||
### Format | ||
|
||
Display names are indicated by a message with a `+draft/display-name` tag using the client-only prefix with the value being the desired name. | ||
|
||
### Fallback string | ||
|
||
Sending clients SHOULD begin their messages with a usable fallback to cater to clients that don't support the display name tag. A common existing method of indicating a display name is to include the desired name at the start of a message, surrounded by angle brackets, backticks, or other forms of parenthesis. | ||
|
||
For instance, the following message has a display name tag with the value `charles` and the message begins with the fallback string `<charles> `. | ||
|
||
``` | ||
@+draft/display-name=charles :bot!bot@bot PRIVMSG #channel :<charles> Hello from outside IRC | ||
``` | ||
|
||
To support this fallback, receiving clients that support the display name tag SHOULD hide such a prefix if it matches the tag value. | ||
|
||
Receiving clients SHOULD check for the presence of formatting codes in the fallback string as well as the U+200B ZERO WIDTH SPACE character, and ignore them when comparing against the display name. These are often used to visually separate the relayed name from the message, and to avoid triggering highlights on users present on both sides of a relay. | ||
|
||
## Client implementation considerations | ||
|
||
This section is non-normative. | ||
|
||
This client tag is not meant as a method of impersonating other IRC users. Take care to make it clear to users when a display name is being used. Consider formatting display names differently to nicknames and making the original nickname visible to the user. | ||
|
||
This client tag is also not meant to be used as a persistent display name for users. The [metadata framework][metadata] would be more suitable for such a use case. | ||
|
||
## Examples | ||
|
||
This section is non-normative. | ||
|
||
Client: @+draft/display-name=Non\sIRC\sUser :bot!bot@bot PRIVMSG #channel :<Non IRC User> Hello from outside IRC | ||
Client: @+draft/display-name=AnotherUser :bot!bot@bot PRIVMSG #channel :<AnotherUser> Hi from me too! | ||
Client: @+draft/display-name=NoPrefixUser :bot!bot@bot PRIVMSG #channel :I'm not sending a fallback prefix | ||
Client: :bot!bot@bot PRIVMSG #channel :Bot message | ||
Client: :alice!alice@alice PRIVMSG #channel :Hi from me! | ||
Client: @+draft/display-name=Colourful :bot!bot@bot PRIVMSG #channel :<[U+0003]03C[U+200B]olourful[U+0003]> My fallback nick is in green | ||
|
||
Example display from a client that supports the display name tag and performs fallback string removal | ||
|
||
``` | ||
<Non IRC User (bot)> Hello from outside IRC | ||
<AnotherUser (bot)> Hi from me too! | ||
<NoPrefixUser (bot)> I'm not sending a fallback prefix | ||
<bot> Bot message | ||
<alice> Hi from me! | ||
<Colourful> My fallback nick is in green | ||
jwheare marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
Example display from a client without support for the display name tag | ||
|
||
``` | ||
<bot> <Non IRC User> Hello from outside IRC | ||
<bot> <AnotherUser> Hi from me too! | ||
<bot> I'm not sending a fallback prefix | ||
<bot> Bot message | ||
<alice> Hi from me! | ||
<bot> <Colourful> My fallback nick is in green | ||
``` | ||
|
||
|
||
[batch]: ../extensions/batch.html | ||
[tags]: ../extensions/message-tags.html | ||
[metadata]: ../core/metadata-3.2.html |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't support
/me
; which relay bots usually encode as* charles
.I don't see an obvious way to provide a fallback for those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I do :)
It should be mentioned explicitly in the spec, so clients can also strip them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this, I'm not sure it should be in scope for this tag to handle these. Relays usually send /me messages as plain PRIVMSG, so to just get rid of the prefix doesn't really do the right job. You'd have to re-encode as an ACTION CTCP to get the desired effect.
This might be the job for another tag to indicate such messages properly.