diff --git a/bashbot-lib b/bashbot-lib index b2f3e46..1da6cf4 160000 --- a/bashbot-lib +++ b/bashbot-lib @@ -1 +1 @@ -Subproject commit b2f3e46713fa6fd78f62b37477aa4376fb301b54 +Subproject commit 1da6cf48d392c430a5ef852c82c90984df636ada diff --git a/bot.sh b/bot.sh index 3c6db0e..a8edf65 100755 --- a/bot.sh +++ b/bot.sh @@ -19,12 +19,14 @@ exec 2>"${bot_tmpdir}/error.log" . ./bashbot-lib/viewer.sh while [ "${1}" == "start" ]; do - grep "\S" <<< $(getupd) >/dev/null || continue + getupd >/dev/null || continue declare -A curmsg getmsg_content curmsg updates.txt view_content curmsg for i in $(awk '{print $1}' ./allowed_ids.txt); do - [ "${curmsg[user_id]}" == "${i}" ] && [ "${curmsg[text]}" == "/start" ] && { + [ "${curmsg[user_id]}" == "${i}" ] && { + [ "${curmsg[callback]}" == "recheck" ] || [ "${curmsg[text]}" == "/start" ] + } && { sendmsg "${curmsg[chat_id]}" $(./getip.sh "${bot_tmpdir}") unset curmsg declare -A curmsg