Forward unknown commands to upstream in single-upstream mode
This commit is contained in:
parent
b0b913293e
commit
0f3dd2f2b1
@ -2287,7 +2287,14 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
dc.logger.Printf("unhandled message: %v", msg)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user