downstream: fix network name msimatch check being too strict
The network name can be set via BOUNCER BIND. In that case we don't want to error out when fallbackNetworkName == "". git-svn-id: https://svn.yakumo.dev/yakumo.izuru/suika/trunk@792 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
parent
0b277a77e6
commit
6ba69ed9fe
@ -1290,7 +1290,7 @@ func (dc *downstreamConn) register(ctx context.Context) error {
|
||||
_, fallbackClientName, fallbackNetworkName := unmarshalUsername(dc.rawUsername)
|
||||
if dc.clientName == "" {
|
||||
dc.clientName = fallbackClientName
|
||||
} else if dc.clientName != fallbackClientName {
|
||||
} else if fallbackClientName != "" && dc.clientName != fallbackClientName {
|
||||
return ircError{&irc.Message{
|
||||
Command: irc.ERR_ERRONEUSNICKNAME,
|
||||
Params: []string{dc.nick, "Client name mismatch in usernames"},
|
||||
@ -1298,7 +1298,7 @@ func (dc *downstreamConn) register(ctx context.Context) error {
|
||||
}
|
||||
if dc.networkName == "" {
|
||||
dc.networkName = fallbackNetworkName
|
||||
} else if dc.networkName != fallbackNetworkName {
|
||||
} else if fallbackNetworkName != "" && dc.networkName != fallbackNetworkName {
|
||||
return ircError{&irc.Message{
|
||||
Command: irc.ERR_ERRONEUSNICKNAME,
|
||||
Params: []string{dc.nick, "Network name mismatch in usernames"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user