Skip to content

Commit

Permalink
player/player.go: Fixed a bug where commands with no arguments would …
Browse files Browse the repository at this point in the history
…have the command be passed as argument.
  • Loading branch information
Sandertv committed Sep 7, 2020
1 parent 5f5d667 commit 8d9038e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dragonfly/player/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ func (p *Player) ExecuteCommand(commandLine string) {
ctx := event.C()
p.handler().HandleCommandExecution(ctx, command, args[1:])
ctx.Continue(func() {
command.Execute(strings.TrimPrefix(commandLine, "/"+commandName+" "), p)

command.Execute(strings.TrimPrefix(strings.TrimPrefix(commandLine, "/"+commandName), " "), p)
})
}

Expand Down

0 comments on commit 8d9038e

Please sign in to comment.