3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

fix roleplay messages not being relayed

See #865.
This commit is contained in:
Shivaram Lingamneni 2020-03-19 12:19:42 -04:00
parent 10ad05ecb0
commit 2bb36e6cb8

View File

@ -47,11 +47,12 @@ func sendRoleplayMessage(server *Server, client *Client, source string, targetSt
for _, member := range channel.Members() { for _, member := range channel.Members() {
for _, session := range member.Sessions() { for _, session := range member.Sessions() {
if member == client && !session.capabilities.Has(caps.EchoMessage) { // see discussion on #865: clients do not understand how to do local echo
continue // of roleplay commands, so send them a copy whether they have echo-message
} else if rb.session == session { // or not
if rb.session == session {
rb.Add(nil, source, "PRIVMSG", channel.name, message) rb.Add(nil, source, "PRIVMSG", channel.name, message)
} else if member == client || session.capabilities.Has(caps.EchoMessage) { } else {
session.Send(nil, source, "PRIVMSG", channel.name, message) session.Send(nil, source, "PRIVMSG", channel.name, message)
} }
} }