-
Notifications
You must be signed in to change notification settings - Fork 85
SETNAME Spec #361
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
Merged
Merged
SETNAME Spec #361
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
2df6bd6
Initial commit of the 'setname' spec
justjanne e15e540
Fixed typos
justjanne 893a7c4
Added examples showing realnames with and without spaces
justjanne 2c258f6
Clarify command vs. message
justjanne 328ae07
Fix typos
justjanne 73968df
Reworded text, added examples, added FAIL
justjanne 4395ef8
Small correction of typos
justjanne 002aa1e
Added clarification
justjanne 5b43f08
More clarifications along the Robustness Principle
justjanne 9a081be
More clarifications
justjanne aaa42fc
Typo
justjanne d71259a
Updated title to render properly
justjanne a92c5be
Further clarifications
justjanne 311aff9
Added clarifications for the non-negotiated use case
justjanne 6b06077
Added RPL_ISUPPORT key
justjanne cc88e2b
Updated title format
justjanne b24f1a6
Simplified RPL_ISUPPORT section
justjanne f62d7fe
Remove legacy compatibility entirely
justjanne 6f2584a
Implement suggested changes
justjanne 4ff648b
Update extensions/setname.md
jwheare 98b58c8
Update extensions/setname.md
jwheare 57d390c
Update extensions/setname.md
jwheare 6b1e350
Update extensions/setname.md
jwheare d14aa62
Update extensions/setname.md
jwheare e569307
Update extensions/setname.md
jwheare 30aa8aa
Update extensions/setname.md
jwheare 47123fa
Update extensions/setname.md
jwheare 9ba42ba
Update extensions/setname.md
jwheare 69882b1
Update extensions/setname.md
jwheare 96dca2e
Update extensions/setname.md
jwheare 0343fbe
Update extensions/setname.md
jwheare b4492f7
Update extensions/setname.md
jwheare 03a9cac
Apply more suggestions
justjanne 87380b4
Link standard replies extension
justjanne 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 hidden or 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,120 @@ | ||
| --- | ||
| title: IRCv3 `setname` Extension | ||
| layout: spec | ||
| work-in-progress: true | ||
| copyrights: | ||
| - | ||
| name: "Janne Mareike Koschinski" | ||
| period: "2019" | ||
| email: "janne@kuschku.de" | ||
| --- | ||
|
|
||
| ## 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 `setname` capability name. Instead, implementations SHOULD use | ||
| the `draft/setname` capability name to be interoperable with other software | ||
| implementing a compatible work-in-progress version. | ||
|
|
||
| The final version of the specification will use an unprefixed capability name. | ||
|
|
||
| ## Motivation | ||
|
|
||
| Historically, a user's realname could only be set on the initial connection | ||
| handshake. However, multiple IRC servers have provided independent non-standard | ||
| commands to update the realname without reconnecting. This specification | ||
| describes a standardised behaviour based on these existing implementations. | ||
|
|
||
| ## Description | ||
|
|
||
| The `draft/setname` client capability allows clients to change their realname | ||
| (GECOS) on an active connection. It also allows servers to directly inform | ||
| clients about such a change. | ||
| This avoids a client reconnect when updating this value. | ||
|
|
||
| This capability MUST be referred to as `draft/setname` at capability | ||
| negotiation time. | ||
|
|
||
| Servers advertising the `draft/setname` capability MUST support usage of the | ||
| command even while the capability is not negotiated. Clients MUST NOT prevent | ||
| users from manually using the command while the capability is not negotiated. | ||
|
|
||
| If a client sends a `SETNAME` command without having negotiated the capability, | ||
| the server SHOULD handle it silently (with no response), as historic | ||
| implementations did. | ||
|
|
||
| When enabled, servers MUST provide a `NAMELEN` token in `RPL_ISUPPORT` with the | ||
| maximum allowed length for realnames. | ||
|
|
||
| The client-to-server `SETNAME` command looks as follows: | ||
|
|
||
| SETNAME :realname goes here | ||
|
|
||
| This command represents the intent to change the realname. The only, trailing | ||
| parameter is the new realname. If the capability is negotiated, the client | ||
| MUST assume that no change has happened until the server confirms this | ||
| change. | ||
|
|
||
| Servers MUST check the realname for validity (taking length limits into | ||
| consideration). If they accept the realname change, they MUST send the | ||
| server-to-client version of the `SETNAME` message to all clients in common | ||
| channels, as well as to the client from which it originated, to confirm the | ||
| change has occurred. | ||
|
|
||
| The `SETNAME` message MUST NOT be sent to clients which do not have the | ||
| `draft/setname` capability negotiated. | ||
|
|
||
| The server-to-client `SETNAME` message looks as follows: | ||
|
|
||
| :nick!user@host SETNAME :realname goes here | ||
|
|
||
| This message represents that the user identified by nick!user@host has changed | ||
| their realname to another value. The only, trailing parameter is the new | ||
| realname. | ||
|
|
||
| In order to take full advantage of the `SETNAME` message, clients must be | ||
| modified to support it. The proper way to do so is this: | ||
|
|
||
| 1) Enable the `draft/setname` capability at capability negotiation time during | ||
| the login handshake. | ||
|
|
||
| 2) On receipt of a server-to-client `SETNAME` message, update the realname | ||
| portion of data structures and process channel users as appropriate. | ||
|
|
||
| ## Errors | ||
|
|
||
| The server MUST use the [standard replies extension][1] to notify the client of | ||
| failed `SETNAME` commands. | ||
|
|
||
| If the server rejects the realname as a result of a validation failure, it MUST | ||
| send a `FAIL` message with the `INVALID_REALNAME` code. | ||
|
|
||
| FAIL SETNAME INVALID_REALNAME :Realname is not valid | ||
|
|
||
| If the server rejects the change for any other reason, it MUST send a `FAIL` | ||
| message with the `CANNOT_CHANGE_REALNAME` code and an appropriate description of | ||
| the reason: | ||
|
|
||
| FAIL SETNAME CANNOT_CHANGE_REALNAME :Slow down your realname changes | ||
| FAIL SETNAME CANNOT_CHANGE_REALNAME :Cannot change realname while banned from a channel | ||
|
|
||
| ## Examples | ||
|
|
||
| Complex realname with spaces | ||
|
|
||
| C: SETNAME :Bruce Wayne <bruce@wayne.enterprises> | ||
| S: :batman@~batman!bat.cave SETNAME :Bruce Wayne <bruce@wayne.enterprises> | ||
|
|
||
| Simple realname | ||
|
|
||
| C: SETNAME Batman | ||
| S: :batman@~batman!bat.cave SETNAME Batman | ||
|
|
||
| Example with realname rejected by the server | ||
|
|
||
| C: SETNAME :Heute back ich, morgen brau ich, übermorgen hol ich der Königin ihr Kind; ach, wie gut, dass niemand weiß, dass ich Rumpelstilzchen heiß! | ||
| S: FAIL SETNAME INVALID_REALNAME :Realname is not valid | ||
|
|
||
| [1]: https://github.com/ircv3/ircv3-specifications/pull/357 | ||
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.
Uh oh!
There was an error while loading. Please reload this page.