diff --git a/server/player/player.go b/server/player/player.go index 9aef58194..78281bd6c 100644 --- a/server/player/player.go +++ b/server/player/player.go @@ -330,10 +330,17 @@ func (p *Player) ExecuteCommand(commandLine string) { return } args := strings.Split(commandLine, " ") - command, ok := cmd.ByAlias(args[0][1:]) + + name := args[0] + if name == "" { + return + } + name = name[1:] + + command, ok := cmd.ByAlias(name) if !ok { o := &cmd.Output{} - o.Errort(cmd.MessageUnknown, args[0]) + o.Errort(cmd.MessageUnknown, name) p.SendCommandOutput(o) return }