Avoid forwarding MONITOR requests if upstream doesn't support it
Clients aren't supposed to do this, but in case they do, let's send them an error.
This commit is contained in:
parent
b2957c05d5
commit
f2a28f6e22
@ -2473,6 +2473,9 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
|
||||
if uc == nil {
|
||||
return newUnknownCommandError(msg.Command)
|
||||
}
|
||||
if _, ok := uc.isupport["MONITOR"]; !ok {
|
||||
return newUnknownCommandError(msg.Command)
|
||||
}
|
||||
|
||||
var subcommand string
|
||||
if err := parseMessageParams(msg, &subcommand); err != nil {
|
||||
|
@ -2075,6 +2075,10 @@ func (uc *upstreamConn) updateChannelAutoDetach(name string) {
|
||||
}
|
||||
|
||||
func (uc *upstreamConn) updateMonitor() {
|
||||
if _, ok := uc.isupport["MONITOR"]; !ok {
|
||||
return
|
||||
}
|
||||
|
||||
add := make(map[string]struct{})
|
||||
var addList []string
|
||||
seen := make(map[string]struct{})
|
||||
|
Loading…
Reference in New Issue
Block a user