From 0f3dd2f2b17d547c8b39fda7b9d021ae075359cc Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 28 May 2021 11:15:15 +0200 Subject: [PATCH] Forward unknown commands to upstream in single-upstream mode --- downstream.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/downstream.go b/downstream.go index eba0560..427c9e6 100644 --- a/downstream.go +++ b/downstream.go @@ -2287,7 +2287,14 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error { } default: dc.logger.Printf("unhandled message: %v", msg) - return newUnknownCommandError(msg.Command) + + // Only forward unknown commands in single-upstream mode + uc := dc.upstream() + if uc == nil { + return newUnknownCommandError(msg.Command) + } + + uc.SendMessageLabeled(dc.id, msg) } return nil }