feat(config): Moved delete_allowed to [bot] section,

Now it works for both command and web interface.

Implemented #293.
This commit is contained in:
Terry Geng
2022-01-21 23:22:43 -05:00
parent a034d2a85d
commit 81b78fa8e3
3 changed files with 15 additions and 6 deletions
+5
View File
@@ -1148,6 +1148,11 @@ def cmd_shortlist(bot, user, text, command, parameter):
def cmd_delete_from_library(bot, user, text, command, parameter):
global song_shortlist, log
if not var.config.getboolean("bot", "delete_allowed", fallback=True):
bot.mumble.users[text.actor].send_text_message(tr('not_admin'))
return
try:
indexes = [int(i) for i in parameter.split(" ")]
except ValueError: