implement command aliases (#2236)

See #2229
This commit is contained in:
Shivaram Lingamneni 2025-03-30 21:32:37 -04:00 committed by GitHub
parent f5bb5afdd6
commit 7256d83ff0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 55 additions and 7 deletions

View file

@ -750,13 +750,8 @@ func (client *Client) run(session *Session) {
break
}
cmd, exists := Commands[msg.Command]
if !exists {
cmd = unknownCommand
} else if invalidUtf8 {
cmd = invalidUtf8Command
}
var cmd Command
msg.Command, cmd = client.server.resolveCommand(msg.Command, invalidUtf8)
isExiting := cmd.Run(client.server, client, session, msg)
if isExiting {
break