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) forwardChannel(dc, ch)
} }
c.srv.lock.Unlock() 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: case irc.RPL_YOURHOST, irc.RPL_CREATED:
// Ignore // Ignore
case irc.RPL_LUSERCLIENT, irc.RPL_LUSEROP, irc.RPL_LUSERUNKNOWN, irc.RPL_LUSERCHANNELS, irc.RPL_LUSERME: case irc.RPL_LUSERCLIENT, irc.RPL_LUSEROP, irc.RPL_LUSERUNKNOWN, irc.RPL_LUSERCHANNELS, irc.RPL_LUSERME: