updated library and implemented allowed_ids
This commit is contained in:
parent
4c230cf3d0
commit
ef20b23401
|
@ -1 +1 @@
|
||||||
Subproject commit d4a4420972e4e147fb955eec9f729e5774c8dd79
|
Subproject commit b2f3e46713fa6fd78f62b37477aa4376fb301b54
|
16
bot.sh
16
bot.sh
|
@ -23,12 +23,14 @@ while [ "${1}" == "start" ]; do
|
||||||
declare -A curmsg
|
declare -A curmsg
|
||||||
getmsg_content curmsg updates.txt
|
getmsg_content curmsg updates.txt
|
||||||
view_content curmsg
|
view_content curmsg
|
||||||
[ "${curmsg[text]}" == "/start" ] && {
|
for i in $(awk '{print $1}' ./allowed_ids.txt); do
|
||||||
sendmsg "${curmsg[chat_id]}" $(./getip.sh "${bot_tmpdir}")
|
[ "${curmsg[user_id]}" == "${i}" ] && [ "${curmsg[text]}" == "/start" ] && {
|
||||||
unset curmsg
|
sendmsg "${curmsg[chat_id]}" $(./getip.sh "${bot_tmpdir}")
|
||||||
declare -A curmsg
|
unset curmsg
|
||||||
getmsg_content curmsg sentmsgs.txt
|
declare -A curmsg
|
||||||
tput setaf 3; view_content curmsg; tput sgr0
|
getmsg_content curmsg sentmsgs.txt
|
||||||
}
|
tput setaf 3; view_content curmsg; tput sgr0
|
||||||
|
}
|
||||||
|
done
|
||||||
unset curmsg
|
unset curmsg
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue