From b24417deda78423345df7beb9e8f94f3ffd8f3ed Mon Sep 17 00:00:00 2001 From: Matthieu Grieger Date: Sat, 25 Jun 2016 10:43:33 -0700 Subject: [PATCH] Fix https://github.com/matthieugrieger/mumbledj/issues/155: Admin settings not being respected --- CHANGELOG.md | 3 +++ bot/mumbledj.go | 2 +- main.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0e308f..8bcb5c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ MumbleDJ Changelog ================== +### June 25, 2016 -- `v3.0.5` +* Fixed admin settings not being respected. + ### June 25, 2016 -- `v3.0.4` * Fixed a crash on `!forceskip`. diff --git a/bot/mumbledj.go b/bot/mumbledj.go index f6001be..adfc23d 100644 --- a/bot/mumbledj.go +++ b/bot/mumbledj.go @@ -268,7 +268,7 @@ func (dj *MumbleDJ) findCommand(message string) (interfaces.Command, error) { func (dj *MumbleDJ) executeCommand(user *gumble.User, message string, command interfaces.Command) (string, bool, error) { canExecute := false - if viper.GetBool("permissions.enabled") && command.IsAdminCommand() { + if viper.GetBool("admins.enabled") && command.IsAdminCommand() { canExecute = dj.IsAdmin(user) } else { canExecute = true diff --git a/main.go b/main.go index 9ad78d8..ef0ecc8 100644 --- a/main.go +++ b/main.go @@ -32,7 +32,7 @@ func init() { services.DJ = DJ bot.DJ = DJ - DJ.Version = "v3.0.4" + DJ.Version = "v3.0.5" logrus.SetLevel(logrus.WarnLevel) }