mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-11 06:29:29 +01:00
Merge pull request #1416 from slingamn/tagmsg_bug.3
fix TAGMSG being relayed to clients without message-tags
This commit is contained in:
commit
a291e5ca74
@ -172,16 +172,20 @@ func (m *MessageCache) InitializeSplitMessage(server *Server, nickmask, accountN
|
||||
|
||||
func (m *MessageCache) Send(session *Session) {
|
||||
if m.fullTags != nil {
|
||||
// Initialize() path:
|
||||
if session.capabilities.Has(caps.MessageTags) {
|
||||
session.sendBytes(m.fullTags, false)
|
||||
} else if !(session.capabilities.Has(caps.ServerTime) || session.capabilities.Has(caps.AccountTag)) {
|
||||
if m.plain != nil {
|
||||
} else if m.plain != nil {
|
||||
// plain == nil indicates a TAGMSG
|
||||
if !(session.capabilities.Has(caps.ServerTime) || session.capabilities.Has(caps.AccountTag)) {
|
||||
session.sendBytes(m.plain, false)
|
||||
}
|
||||
} else {
|
||||
// slowpath
|
||||
session.sendFromClientInternal(false, m.time, m.msgid, m.source, m.accountName, nil, m.command, m.params...)
|
||||
}
|
||||
}
|
||||
} else if m.fullTagsMultiline != nil {
|
||||
// InitializeSplitMessage() path:
|
||||
if session.capabilities.Has(caps.Multiline) {
|
||||
for _, line := range m.fullTagsMultiline {
|
||||
session.sendBytes(line, false)
|
||||
@ -191,6 +195,7 @@ func (m *MessageCache) Send(session *Session) {
|
||||
session.sendBytes(line, false)
|
||||
}
|
||||
} else {
|
||||
// slowpath
|
||||
session.sendSplitMsgFromClientInternal(false, m.source, m.accountName, m.tags, m.command, m.target, m.splitMessage)
|
||||
}
|
||||
}
|
||||
|
2
irctest
2
irctest
@ -1 +1 @@
|
||||
Subproject commit 14435ce0e8af86d0d0be5d9eca35bf2ab9931b4f
|
||||
Subproject commit 8c66157a9ea22a824dc55210903222889cc3672d
|
Loading…
Reference in New Issue
Block a user