diff --git a/addons/antiFlood.sh b/addons/antiFlood.sh index 4cf7b20..b1203c1 100644 --- a/addons/antiFlood.sh +++ b/addons/antiFlood.sh @@ -4,7 +4,7 @@ # this addon counts how many files, e.g. stickers, are sent to # a chat and takes actions if threshold is reached # -#### $$VERSION$$ v0.90-0-g7029f7f +#### $$VERSION$$ v0.90-6-g5819b5c # used events: # @@ -58,15 +58,18 @@ if [[ "$1" = "start"* ]]; then ANTIFL_CHATS["${CHAT[ID]}","level"]="${ANTIFL_DEFAULT}" ANTIFL_CHATS["${CHAT[ID]}","ban"]="${ANTIFL_BAN}" [[ "${CMD[1]}" =~ ^[0-9]+$ ]] && ANTIFL_CHATS["${CHAT[ID]}","level"]="${CMD[1]}" + [[ "${CMD[2]}" =~ ^[0-9]+$ ]] && ANTIFL_CHATS["${CHAT[ID]}","ban"]="${CMD[2]}" antiFlood_timer ;; # command /afactive starts counter meausares - "/afdo") + "/afdo" | "/afactive") ANTIFL_CHATS["${CHAT[ID]}","active"]="yes" + jssh_writeDB "ANTIFL_CHATS" "addons/$ANTIFL_ME" & ;; # command /afactive starts counter meausares "/afstop") ANTIFL_CHATS["${CHAT[ID]}","active"]="no" + jssh_writeDB "ANTIFL_CHATS" "addons/$ANTIFL_ME" & ;; esac } diff --git a/bashbot.sh b/bashbot.sh index e3bb3a8..ed5184f 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.90-3-g9a81e44 +#### $$VERSION$$ v0.90-6-g5819b5c # # Exit Codes: # - 0 sucess (hopefully) @@ -215,7 +215,7 @@ _is_function() declare -xr DELETE_URL=$URL'/deleteMessage' delete_message() { - sendJson "${1}" 'message_id: '"${2}"'' "${DELETE_URL}" + sendJson "${1}" '"message_id": '"${2}"'' "${DELETE_URL}" } get_file() {