mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
commit
f5e9fd3e77
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user