downstream: refuse to enable multi-upstream mode

References: https://todo.sr.ht/~emersion/soju/125
This commit is contained in:
Simon Ser 2022-08-05 18:33:41 +02:00
parent 027a89a0b0
commit 1ea3a19403

View File

@ -1411,14 +1411,10 @@ func (dc *downstreamConn) loadNetwork(ctx context.Context) error {
}
if dc.registration.networkName == "*" {
if !dc.srv.Config().MultiUpstream {
return ircError{&irc.Message{
Command: irc.ERR_PASSWDMISMATCH,
Params: []string{dc.nick, fmt.Sprintf("Multi-upstream mode is disabled on this server")},
}}
}
dc.isMultiUpstream = true
return nil
return ircError{&irc.Message{
Command: irc.ERR_PASSWDMISMATCH,
Params: []string{dc.nick, fmt.Sprintf("Multi-upstream mode is no longer supported")},
}}
}
if dc.registration.networkName == "" {