downstream: return FAIL on unknown BOUNCER command before registration

This commit is contained in:
Simon Ser 2023-04-05 13:36:36 +02:00
parent 41399ca6fd
commit de02cb98fe
1 changed files with 5 additions and 0 deletions

View File

@ -740,6 +740,11 @@ func (dc *downstreamConn) handleMessageUnregistered(ctx context.Context, msg *ir
}
dc.registration.networkID = id
default:
return ircError{&irc.Message{
Command: "FAIL",
Params: []string{"BOUNCER", "UNKNOWN_COMMAND", subcommand, "Unknown subcommand"},
}}
}
default:
dc.logger.Printf("unhandled message: %v", msg)