diff --git a/irc/channel.go b/irc/channel.go index 05a96459..a8308a4b 100644 --- a/irc/channel.go +++ b/irc/channel.go @@ -244,11 +244,12 @@ func (channel *Channel) PrivMsg(client *Client, message Text) { client.ErrCannotSendToChan(channel) return } + reply := RplPrivMsg(client, channel, message) for member := range channel.members { if member == client { continue } - member.Reply(RplPrivMsg(client, channel, message)) + member.Reply(reply) } } @@ -458,11 +459,12 @@ func (channel *Channel) Notice(client *Client, message Text) { client.ErrCannotSendToChan(channel) return } + reply := RplNotice(client, channel, message) for member := range channel.members { if member == client { continue } - member.Reply(RplNotice(client, channel, message)) + member.Reply(reply) } } diff --git a/irc/theater.go b/irc/theater.go index 36525048..4fa6a2f4 100644 --- a/irc/theater.go +++ b/irc/theater.go @@ -89,8 +89,9 @@ func (m *TheaterPrivMsgCommand) HandleServer(s *Server) { return } + reply := RplPrivMsg(TheaterClient(m.asNick), channel, m.message) for member := range channel.members { - member.Reply(RplPrivMsg(TheaterClient(m.asNick), channel, m.message)) + member.Reply(reply) } } @@ -124,7 +125,8 @@ func (m *TheaterActionCommand) HandleServer(s *Server) { return } + reply := RplCTCPAction(TheaterClient(m.asNick), channel, m.action) for member := range channel.members { - member.Reply(RplCTCPAction(TheaterClient(m.asNick), channel, m.action)) + member.Reply(reply) } }