mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-26 01:07:34 +00:00
show blocked users on stats
This commit is contained in:
parent
2dc1f385f2
commit
1952610282
17
bashbot.sh
17
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.99-dev2-11-gc5ce29a
|
||||
#### $$VERSION$$ v0.99-dev2-12-g2dc1f38
|
||||
#
|
||||
# Exit Codes:
|
||||
# - 0 success (hopefully)
|
||||
@ -1125,7 +1125,22 @@ if [ -z "${SOURCE}" ]; then
|
||||
do
|
||||
(( MESSAGES+=MSG ))
|
||||
done
|
||||
if [ "${USERS}" != "" ]; then
|
||||
echo "A total of ${MESSAGES} messages from ${USERS} users are processed."
|
||||
else
|
||||
echo "No one used your bot so far ..."
|
||||
fi
|
||||
jssh_readDB_async "STATS" "${BLOCKEDFILE}"
|
||||
for MSG in ${!STATS[*]}
|
||||
do
|
||||
[[ ! "${MSG}" =~ ^[0-9-]*$ ]] && continue
|
||||
(( BLOCKS++ ))
|
||||
done
|
||||
if [ "${BLOCKS}" != "" ]; then
|
||||
echo -e "Note: ${BLOCKS} users are blocked by your bot:${GREY}"
|
||||
sort -r "${BLOCKEDFILE}.jssh"
|
||||
echo -e "${NC}\c"
|
||||
fi
|
||||
debug_checks "end $1" "$@"
|
||||
exit
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user