diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bacc96..f9e787f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ MumbleDJ Changelog ================== +### January 19, 2015 -- `v2.2.11` +* Fixed not being able to use the move command with channels with spaces in their name. + ### January 14, 2015 -- `v2.2.9, v2.2.10` * Set AudioEncoder Application to `gopus.Audio` instead of `gopus.Voice` for hopefully better sound quality. * Added some commands to the !help string that were missing. diff --git a/commands.go b/commands.go index 3307b2f..8a080f3 100644 --- a/commands.go +++ b/commands.go @@ -24,8 +24,8 @@ func parseCommand(user *gumble.User, username, command string) { var com, argument string sanitizedCommand := sanitize.HTML(command) if strings.Contains(sanitizedCommand, " ") { - parsedCommand := strings.Split(sanitizedCommand, " ") - com, argument = parsedCommand[0], parsedCommand[1] + index := strings.Index(sanitizedCommand, " ") + com, argument = sanitizedCommand[0:index], sanitizedCommand[(index + 1):] } else { com = command argument = ""