Fixed dj.conf.General.CommandPrefix

This commit is contained in:
Matthieu Grieger 2014-12-27 10:40:32 -08:00
parent 95a009163e
commit 2f18de2ea4
2 changed files with 2 additions and 1 deletions

View file

@ -13,6 +13,7 @@ MumbleDJ Changelog
* Added a reload command, used to reload the configuration when a change is made.
* Implemented volume control. Now changes volume while audio is playing!
* Code is now more thoroughly commented.
* Fixed char comparison with dj.conf.General.CommandPrefix.
### December 8, 2014
* Switched from Ruby to Go, using `gumble` instead of `mumble-ruby` now.

View file

@ -66,7 +66,7 @@ func (dj *mumbledj) OnDisconnect(e *gumble.DisconnectEvent) {
// OnTextMessage event. Checks for command prefix, and calls parseCommand if it exists. Ignores
// the incoming message otherwise.
func (dj *mumbledj) OnTextMessage(e *gumble.TextMessageEvent) {
if e.Message[0] == dj.conf.General.CommandPrefix {
if e.Message[0] == dj.conf.General.CommandPrefix[0] {
parseCommand(e.Sender, e.Sender.Name(), e.Message[1:])
}
}