From e80b98ac850e1ee4389c10e33560c4144885f079 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Thu, 30 May 2019 20:09:41 +0200 Subject: [PATCH] addons/antiFlood finished --- addons/antiFlood.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/antiFlood.sh b/addons/antiFlood.sh index 6a535f5..202651a 100644 --- a/addons/antiFlood.sh +++ b/addons/antiFlood.sh @@ -99,8 +99,10 @@ if [[ "$1" = "start"* ]]; then fi # check user flood picture # shellcheck disable=SC2154 - [ "$1" = "file" ] && (( ANTIFL_ACTUALS["${CHAT[ID]}","${USER[ID]}","file"]++ )) - antiFlood_action & # do actions in subshell + if [ "$1" = "file" ]; then + (( ANTIFL_ACTUALS["${CHAT[ID]}","${USER[ID]}","file"]++ )) + antiFlood_action & # do actions in subshell + fi } # check and handle actions