From 166aa957b95a5528ad2096d0a68530de04d20d90 Mon Sep 17 00:00:00 2001 From: plocki Date: Fri, 31 Jan 2020 21:26:01 +0100 Subject: [PATCH] changed blacklist to whitelist --- modules/task.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/task.py b/modules/task.py index b8cd701..06462a9 100644 --- a/modules/task.py +++ b/modules/task.py @@ -6,14 +6,14 @@ class MatrixModule: args = event.body.split() args.pop(0) encoding="utf-8" - forbidden_args = ['help', 'edit', 'command', 'stats', 'config', 'ghistory', 'burndown'] + + allowed_args = ['list', 'add', 'del','done', 'undo', 'calc'] # wrap task if not args: args=['list'] - if args[0] in forbidden_args: - print(args[0], "found in List: " , forbidden_args) + if args[0] not in allowed_args: await bot.send_text(room, "command not allowed") return()