Fix https://github.com/matthieugrieger/mumbledj/issues/32: '\!' being recognized as '\!skipplaylist'

This commit is contained in:
Matthieu Grieger 2015-02-02 11:34:07 -08:00
parent 5c6a87bdc0
commit 23ef674313
2 changed files with 3 additions and 2 deletions

View file

@ -1,8 +1,9 @@
MumbleDJ Changelog
==================
### February 2, 2015 -- `v2.3.4`
### February 2, 2015 -- `v2.3.4, v2.3.5`
* Added panic on audio play fail for debugging purposes.
* Fixed '!' being recognized as '!skipplaylist'.
### January 30, 2015 -- `v2.3.3`
* Fixed private messages crashing the bot when the target user switches channels or disconnects.

View file

@ -68,7 +68,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[0] {
if e.Message[0] == dj.conf.General.CommandPrefix[0] && e.Message != dj.conf.General.CommandPrefix {
parseCommand(e.Sender, e.Sender.Name(), e.Message[1:])
}
}