Uphold echo-message even with BouncerServ

Fixes <https://todo.sr.ht/~emersion/soju/74>
This commit is contained in:
Hubert Hirtz 2020-11-23 17:14:42 +01:00 committed by Simon Ser
parent 473a0f018b
commit cab0fc2b7d
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -1568,6 +1568,16 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
for _, name := range strings.Split(targetsStr, ",") { for _, name := range strings.Split(targetsStr, ",") {
if name == serviceNick { if name == serviceNick {
if dc.caps["echo-message"] {
echoTags := tags.Copy()
echoTags["time"] = irc.TagValue(time.Now().UTC().Format(serverTimeLayout))
dc.SendMessage(&irc.Message{
Tags: echoTags,
Prefix: dc.prefix(),
Command: "PRIVMSG",
Params: []string{name, text},
})
}
handleServicePRIVMSG(dc, text) handleServicePRIVMSG(dc, text)
continue continue
} }