Fix https://github.com/matthieugrieger/mumbledj/issues/23: Move to channel with spaces in name
This commit is contained in:
parent
4d08287530
commit
7465922c43
|
@ -1,6 +1,9 @@
|
||||||
MumbleDJ Changelog
|
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`
|
### January 14, 2015 -- `v2.2.9, v2.2.10`
|
||||||
* Set AudioEncoder Application to `gopus.Audio` instead of `gopus.Voice` for hopefully better sound quality.
|
* 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.
|
* Added some commands to the !help string that were missing.
|
||||||
|
|
|
@ -24,8 +24,8 @@ func parseCommand(user *gumble.User, username, command string) {
|
||||||
var com, argument string
|
var com, argument string
|
||||||
sanitizedCommand := sanitize.HTML(command)
|
sanitizedCommand := sanitize.HTML(command)
|
||||||
if strings.Contains(sanitizedCommand, " ") {
|
if strings.Contains(sanitizedCommand, " ") {
|
||||||
parsedCommand := strings.Split(sanitizedCommand, " ")
|
index := strings.Index(sanitizedCommand, " ")
|
||||||
com, argument = parsedCommand[0], parsedCommand[1]
|
com, argument = sanitizedCommand[0:index], sanitizedCommand[(index + 1):]
|
||||||
} else {
|
} else {
|
||||||
com = command
|
com = command
|
||||||
argument = ""
|
argument = ""
|
||||||
|
|
Reference in a new issue