diff --git a/gencapdefs.py b/gencapdefs.py index e717c0bd..efd92ccf 100644 --- a/gencapdefs.py +++ b/gencapdefs.py @@ -100,10 +100,10 @@ CAPDEFS = [ standard="proposed IRCv3", ), CapDef( - identifier="Rename", - name="draft/rename", - url="https://github.com/SaberUK/ircv3-specifications/blob/rename/extensions/rename.md", - standard="proposed IRCv3", + identifier="ChannelRename", + name="draft/channel-rename", + url="https://ircv3.net/specs/extensions/channel-rename", + standard="draft IRCv3", ), CapDef( identifier="Resume", diff --git a/irc/caps/defs.go b/irc/caps/defs.go index f226cda5..70128b56 100644 --- a/irc/caps/defs.go +++ b/irc/caps/defs.go @@ -37,6 +37,10 @@ const ( // https://ircv3.net/specs/extensions/chghost-3.2.html ChgHost Capability = iota + // ChannelRename is the draft IRCv3 capability named "draft/channel-rename": + // https://ircv3.net/specs/extensions/channel-rename + ChannelRename Capability = iota + // Chathistory is the proposed IRCv3 capability named "draft/chathistory": // https://github.com/ircv3/ircv3-specifications/pull/393 Chathistory Capability = iota @@ -57,10 +61,6 @@ const ( // https://github.com/ircv3/ircv3-specifications/pull/417 Relaymsg Capability = iota - // Rename is the proposed IRCv3 capability named "draft/rename": - // https://github.com/SaberUK/ircv3-specifications/blob/rename/extensions/rename.md - Rename Capability = iota - // Resume is the proposed IRCv3 capability named "draft/resume-0.5": // https://github.com/DanielOaks/ircv3-specifications/blob/master+resume/extensions/resume.md Resume Capability = iota @@ -131,12 +131,12 @@ var ( "batch", "cap-notify", "chghost", + "draft/channel-rename", "draft/chathistory", "draft/event-playback", "draft/languages", "draft/multiline", "draft/relaymsg", - "draft/rename", "draft/resume-0.5", "echo-message", "extended-join", diff --git a/irc/caps/set_test.go b/irc/caps/set_test.go index dae983a0..4943ec91 100644 --- a/irc/caps/set_test.go +++ b/irc/caps/set_test.go @@ -78,14 +78,14 @@ func BenchmarkSetReads(b *testing.B) { set.Has(UserhostInNames) set.Has(LabeledResponse) set.Has(EchoMessage) - set.Has(Rename) + set.Has(Nope) } } func BenchmarkSetWrites(b *testing.B) { for i := 0; i < b.N; i++ { set := NewSet(UserhostInNames, EchoMessage) - set.Add(Rename) + set.Add(Nope) set.Add(ExtendedJoin) set.Remove(UserhostInNames) set.Remove(LabeledResponse) diff --git a/irc/handlers.go b/irc/handlers.go index ee2daf69..3db6ee5a 100644 --- a/irc/handlers.go +++ b/irc/handlers.go @@ -2554,7 +2554,7 @@ func renameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re targetRb = NewResponseBuffer(mSession) targetPrefix = mDetails.nickMask } - if mSession.capabilities.Has(caps.Rename) { + if mSession.capabilities.Has(caps.ChannelRename) { if reason != "" { targetRb.Add(nil, clientPrefix, "RENAME", oldName, newName, reason) } else {