Forward PRIVMSG messages

This commit is contained in:
Simon Ser 2020-02-07 11:07:01 +01:00
parent 0706d45aba
commit 7abf426447
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -278,6 +278,12 @@ func (c *upstreamConn) handleMessage(msg *irc.Message) error {
forwardChannel(dc, ch)
}
c.srv.lock.Unlock()
case "PRIVMSG":
c.srv.lock.Lock()
for _, dc := range c.srv.downstreamConns {
dc.messages <- msg
}
c.srv.lock.Unlock()
case irc.RPL_YOURHOST, irc.RPL_CREATED:
// Ignore
case irc.RPL_LUSERCLIENT, irc.RPL_LUSEROP, irc.RPL_LUSERUNKNOWN, irc.RPL_LUSERCHANNELS, irc.RPL_LUSERME: