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

Review fixes

This commit is contained in:
Daniel Oaks 2020-06-09 02:05:29 +10:00
parent 4535c82fd3
commit 48509ea852

View File

@ -1899,7 +1899,7 @@ func messageHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *R
} }
if isForRelayClient { if isForRelayClient {
if histType == history.Privmsg { if histType == history.Privmsg {
rb.Add(nil, server.name, ERR_NOSUCHNICK, client.Nick(), targetString, client.t("Relayed users cannot be sent private messages")) rb.Add(nil, server.name, ERR_NOSUCHNICK, client.Nick(), targetString, client.t("Relayed users cannot receive private messages"))
} }
// TAGMSG/NOTICEs are intentionally silently dropped // TAGMSG/NOTICEs are intentionally silently dropped
continue continue
@ -2334,6 +2334,7 @@ func relaymsgHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *
}, "") }, "")
// send msg // send msg
channelName := channel.Name()
for _, member := range channel.Members() { for _, member := range channel.Members() {
for _, session := range member.Sessions() { for _, session := range member.Sessions() {
var tagsToUse map[string]string var tagsToUse map[string]string
@ -2343,7 +2344,7 @@ func relaymsgHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *
} }
} }
session.sendSplitMsgFromClientInternal(false, nick, "", tagsToUse, "PRIVMSG", channel.Name(), message) session.sendSplitMsgFromClientInternal(false, nick, "", tagsToUse, "PRIVMSG", channelName, message)
} }
} }
return false return false