Browse Source

fix #1259

tags/v2.4.0-rc1
Shivaram Lingamneni 3 years ago
parent
commit
20aaa1ab06
4 changed files with 12 additions and 12 deletions
  1. 4
    4
      gencapdefs.py
  2. 5
    5
      irc/caps/defs.go
  3. 2
    2
      irc/caps/set_test.go
  4. 1
    1
      irc/handlers.go

+ 4
- 4
gencapdefs.py View File

@@ -100,10 +100,10 @@ CAPDEFS = [
100 100
         standard="proposed IRCv3",
101 101
     ),
102 102
     CapDef(
103
-        identifier="Rename",
104
-        name="draft/rename",
105
-        url="https://github.com/SaberUK/ircv3-specifications/blob/rename/extensions/rename.md",
106
-        standard="proposed IRCv3",
103
+        identifier="ChannelRename",
104
+        name="draft/channel-rename",
105
+        url="https://ircv3.net/specs/extensions/channel-rename",
106
+        standard="draft IRCv3",
107 107
     ),
108 108
     CapDef(
109 109
         identifier="Resume",

+ 5
- 5
irc/caps/defs.go View File

@@ -37,6 +37,10 @@ const (
37 37
 	// https://ircv3.net/specs/extensions/chghost-3.2.html
38 38
 	ChgHost Capability = iota
39 39
 
40
+	// ChannelRename is the draft IRCv3 capability named "draft/channel-rename":
41
+	// https://ircv3.net/specs/extensions/channel-rename
42
+	ChannelRename Capability = iota
43
+
40 44
 	// Chathistory is the proposed IRCv3 capability named "draft/chathistory":
41 45
 	// https://github.com/ircv3/ircv3-specifications/pull/393
42 46
 	Chathistory Capability = iota
@@ -57,10 +61,6 @@ const (
57 61
 	// https://github.com/ircv3/ircv3-specifications/pull/417
58 62
 	Relaymsg Capability = iota
59 63
 
60
-	// Rename is the proposed IRCv3 capability named "draft/rename":
61
-	// https://github.com/SaberUK/ircv3-specifications/blob/rename/extensions/rename.md
62
-	Rename Capability = iota
63
-
64 64
 	// Resume is the proposed IRCv3 capability named "draft/resume-0.5":
65 65
 	// https://github.com/DanielOaks/ircv3-specifications/blob/master+resume/extensions/resume.md
66 66
 	Resume Capability = iota
@@ -131,12 +131,12 @@ var (
131 131
 		"batch",
132 132
 		"cap-notify",
133 133
 		"chghost",
134
+		"draft/channel-rename",
134 135
 		"draft/chathistory",
135 136
 		"draft/event-playback",
136 137
 		"draft/languages",
137 138
 		"draft/multiline",
138 139
 		"draft/relaymsg",
139
-		"draft/rename",
140 140
 		"draft/resume-0.5",
141 141
 		"echo-message",
142 142
 		"extended-join",

+ 2
- 2
irc/caps/set_test.go View File

@@ -78,14 +78,14 @@ func BenchmarkSetReads(b *testing.B) {
78 78
 		set.Has(UserhostInNames)
79 79
 		set.Has(LabeledResponse)
80 80
 		set.Has(EchoMessage)
81
-		set.Has(Rename)
81
+		set.Has(Nope)
82 82
 	}
83 83
 }
84 84
 
85 85
 func BenchmarkSetWrites(b *testing.B) {
86 86
 	for i := 0; i < b.N; i++ {
87 87
 		set := NewSet(UserhostInNames, EchoMessage)
88
-		set.Add(Rename)
88
+		set.Add(Nope)
89 89
 		set.Add(ExtendedJoin)
90 90
 		set.Remove(UserhostInNames)
91 91
 		set.Remove(LabeledResponse)

+ 1
- 1
irc/handlers.go View File

@@ -2554,7 +2554,7 @@ func renameHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
2554 2554
 				targetRb = NewResponseBuffer(mSession)
2555 2555
 				targetPrefix = mDetails.nickMask
2556 2556
 			}
2557
-			if mSession.capabilities.Has(caps.Rename) {
2557
+			if mSession.capabilities.Has(caps.ChannelRename) {
2558 2558
 				if reason != "" {
2559 2559
 					targetRb.Add(nil, clientPrefix, "RENAME", oldName, newName, reason)
2560 2560
 				} else {

Loading…
Cancel
Save