Skip to content

Update draft/rename impl#1223

Merged
slingamn merged 1 commit intoergochat:masterfrom
hhirtz:rename
Aug 5, 2020
Merged

Update draft/rename impl#1223
slingamn merged 1 commit intoergochat:masterfrom
hhirtz:rename

Conversation

@hhirtz
Copy link
Copy Markdown
Contributor

@hhirtz hhirtz commented Aug 4, 2020

Fixes #1122

New draft: ircv3/ircv3-specifications#420
Former draft: ircv3/ircv3-specifications#308

Quoting the new draft commit message:

Changes from the earlier PR so far:

  1. Drop MODE message from fallback requirements
  2. Switch to standard replies FAIL codes for new error cases
  3. Existing error numerics such as ERR_CHANOPRIVSNEEDED are preferred
  4. Move normative fallback mechanism to its own section and add an example
  5. Mention case changes explicitly
  6. Don't use RFC keywords in non-normative security section
  1. already done
  2. done in commit 9d86a76
  3. already done
  4. already done
  5. done in commit 0103e14
  6. N/A

Feel free to squash before merging.

@slingamn
Copy link
Copy Markdown
Member

slingamn commented Aug 4, 2020

Thanks so much, this is a huge help!

I'll review this soon; I'm going to ask some questions about the "silent" case changes. In general I'm trying to move more towards a setup where clients can treat all server-sent identifiers as opaque byte strings (see #1083 in particular).

@slingamn
Copy link
Copy Markdown
Member

slingamn commented Aug 4, 2020

From discussion on ircv3/ircv3-specifications#420, can you ensure the fallback is sent for case changes?

@hhirtz
Copy link
Copy Markdown
Contributor Author

hhirtz commented Aug 4, 2020

Still todo: use the stored channel name instead of oldName in replies (will work on that tomorrow)

@slingamn
Copy link
Copy Markdown
Member

slingamn commented Aug 5, 2020

This looks great! Would you mind squashing it yourself?

@slingamn slingamn added this to the v2.3 milestone Aug 5, 2020
irc/handlers.go Outdated
rb.Add(nil, server.name, ERR_NOSUCHCHANNEL, client.Nick(), utils.SafeErrorParam(oldName), client.t("No such channel"))
return false
}
oldName = channel.name
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry, this should use channel.Name()

Link to the new draft PR:
<ircv3/ircv3-specifications#420>

Changes in the spec:

- Use standard replies instead of numerics:
  <https://github.com/ircv3/ircv3-specifications/pull/420/files#diff-70e90beef48dc9cf5d784d1e179ea822R44>
- Allow RENAME to a different case:
  <https://github.com/ircv3/ircv3-specifications/pull/420/files#diff-70e90beef48dc9cf5d784d1e179ea822R42>

This commit makes oragono send the PART-JOIN fallback even on case-only
changes. This is so that clients don't have to worry about oragono's
UTF8 casefolding. See the following comments for further info:
<ircv3/ircv3-specifications#420 (comment)>

Misc fixes:

- Remove unused variable,
- Add missing calls to utils.SafeErrorParam,
- Don't fill replies with the user-provided "oldName", for the same
  reason as sending the PART-JOIN fallback.
@slingamn slingamn merged commit 7b28fc7 into ergochat:master Aug 5, 2020
@hhirtz hhirtz deleted the rename branch August 19, 2020 09:43
@jwheare
Copy link
Copy Markdown

jwheare commented Sep 6, 2020

The cap name is now draft/channel-rename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update rename implementation

3 participants