diff --git a/downstream.go b/downstream.go index 7d0e5c8..be2faf8 100644 --- a/downstream.go +++ b/downstream.go @@ -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 { diff --git a/upstream.go b/upstream.go index 218cd4d..c4d50e0 100644 --- a/upstream.go +++ b/upstream.go @@ -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{})