This commit is contained in:
Matthieu Grieger 2015-02-09 15:12:04 -08:00
parent e251b0ccda
commit 16572caad9
2 changed files with 5 additions and 2 deletions

View file

@ -3,6 +3,7 @@ MumbleDJ Changelog
### February 9, 2015 -- `v2.4.3`
* Added configuration option in `mumbledj.gcfg` for default bot comment.
* Fixed text messages only containing images crashing the bot.
### February 7, 2015 -- `v2.4.2`
* Updated `gumble` and `gumbleutil` dependencies.

View file

@ -72,8 +72,10 @@ func (dj *mumbledj) OnDisconnect(e *gumble.DisconnectEvent) {
// the incoming message otherwise.
func (dj *mumbledj) OnTextMessage(e *gumble.TextMessageEvent) {
plainMessage := gumbleutil.PlainText(&e.TextMessage)
if plainMessage[0] == dj.conf.General.CommandPrefix[0] && plainMessage != dj.conf.General.CommandPrefix {
parseCommand(e.Sender, e.Sender.Name(), plainMessage[1:])
if len(plainMessage) != 0 {
if plainMessage[0] == dj.conf.General.CommandPrefix[0] && plainMessage != dj.conf.General.CommandPrefix {
parseCommand(e.Sender, e.Sender.Name(), plainMessage[1:])
}
}
}