-
Notifications
You must be signed in to change notification settings - Fork 85
[WIP] Channel renaming extension. #308
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
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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,91 @@ | ||
| --- | ||
| title: IRCv3 `rename` Extension | ||
| layout: spec | ||
| work-in-progress: true | ||
| copyrights: | ||
| - | ||
| name: "Peter Powell" | ||
| email: "petpow@saberuk.com" | ||
| period: "2017-2018" | ||
| --- | ||
|
|
||
| ## 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 `rename` capability name. Instead, implementations SHOULD use the `draft/rename` 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. | ||
|
|
||
| ## Introduction | ||
|
|
||
| Currently there is no reasonable way to rename channels. All existing methods involve closing down the channel and redirecting it to the a new one. This is undesirable as access and ban lists needs to be manually copied. It also causes problems for client logging as history is split across multiple files. | ||
|
|
||
| This specification introduces a method of natively renaming channels that does not suffer from these faults. | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Capabilities | ||
|
|
||
| This specification introduces the `draft/rename` capability. This capability informs the server that the client is capable of handling `RENAME` messages. | ||
|
|
||
| ### Messages | ||
|
|
||
| This specification adds the `RENAME` C2S and S2C message. This message informs a client that the name of a channel has been changed. | ||
|
|
||
| The `RENAME` message has between two and three parameters. The first parameter is the current channel name, the second parameter is the new channel name, and the optional third parameter is a reason for renaming the channel. | ||
|
|
||
| Server implementations SHOULD NOT allow channels to be converted between types with the `RENAME` message. Client implementations SHOULD be able to handle renaming between channel types. | ||
|
|
||
| ### Numerics | ||
|
|
||
| | No. | Label | Format | | ||
| | --- | --------------------| ---------------------------------------------- | | ||
| | 692 | `ERR_CHANNAMEINUSE` | `<nick> <new-channel> :Channel already exists` | | ||
| | 693 | `ERR_CANNOTRENAME` | `<nick> <old-channel> <new-channel> :<reason>` | | ||
|
|
||
| ### Examples | ||
|
|
||
| Renaming a channel with a reason: | ||
|
|
||
| C: RENAME #boaring #boring :Typo fix | ||
| S: :nick!user@host RENAME #boaring #boring :Typo fix | ||
|
|
||
| Renaming a channel without a reason: | ||
|
|
||
| C: RENAME #coding #programming | ||
| S: :nick!user@host RENAME #coding #programming | ||
|
|
||
| Failing to rename a channel because the user does not have the appropriate privileges (this example is non-normative): | ||
|
|
||
| C: RENAME #aniki #aneki | ||
| S: :irc.example.com 482 nick #aniki :You must be a channel operator | ||
|
|
||
| Failing to rename a channel because the new channel name already exists: | ||
|
|
||
| C: RENAME #evil #good :Don't be evil | ||
| S: :irc.example.com 692 nick #good :Channel already exists | ||
|
|
||
| Failing to rename a channel because you can not convert between channel types (this example is non-normative): | ||
|
|
||
| C: RENAME #global %local | ||
| S: :irc.example.com 693 nick #global %local :You cannot change a channel type | ||
|
|
||
| Failing to rename a channel because it has been renamed recently: | ||
|
|
||
| C: RENAME #magical-girls #witches | ||
| S: :irc.example.com 693 nick #magical-girls #witches :This channel has been renamed recently | ||
|
|
||
| ## Implementation Considerations | ||
|
|
||
| Server implementations MUST implement a fallback method for legacy clients. This method MUST involve sending the legacy client a `PART` message for the old channel name, with the rename reason as the part message if given, followed by the usual messages that would be sent if the legacy client had joined the new channel normally (`JOIN`, `RPL_TOPIC`, `RPL_NAMREPLY`, etc) and finally a `MODE` message to restore any prefix modes that the legacy client has applied to it. | ||
|
|
||
| Server implementations MAY implement `JOIN` redirection from the old channel to the new channel for as long as is deemed necessary. | ||
|
|
||
| Server implementations MAY implement a cooldown system to prevent abuse. | ||
|
|
||
| ## Security Considerations | ||
|
|
||
| Server implementations that link across a network MUST take measures to prevent channel name collisions. An example of such a method would be to use channel identifiers similar to how user identifiers are used to prevent nickname collisions in server-to-server protocols. | ||
|
|
||
| Server implementations MAY limit the renaming of channels to privileged individuals in order to prevent abuse. | ||
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.
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.
Prompted by ergochat/ergo#300 (comment)
MODE isn't needed here. Prefix modes come from NAMES, and the channel mode is not normally included in a join burst, clients will request it on join.
(Edit to add a one-click suggestion)