Fixed dj.conf.General.CommandPrefix
This commit is contained in:
parent
95a009163e
commit
2f18de2ea4
|
@ -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.
|
||||
|
|
2
main.go
2
main.go
|
@ -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:])
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue