fixed typo and unset new vars at end

This commit is contained in:
celso 2023-10-09 02:15:50 -03:00
parent 26303edf63
commit 492684baa3
1 changed files with 3 additions and 3 deletions

6
bot.sh
View File

@ -54,7 +54,7 @@ while [ "${1}" == "start" ]; do
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again..." editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again..."
ps -w -w -U steam -o args= | grep "hlds_linux" >/dev/null \ ps -w -w -U steam -o args= | grep "hlds_linux" >/dev/null \
&& __cstrike_status="online" || __cstrike_status="offline" && __cstrike_status="online" || __cstrike_status="offline"
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "${__ip}%0Aterraria(${__terraria_status}): port 7777%0Afactorio(${__factorio_status}: port 34197%0Asyncplay(${__syncplay_status}): port 60000%0Acstrike(${__cstrike_status}): port 64000" "${inline_kbd}" editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "${__ip}%0Aterraria(${__terraria_status}): port 7777%0Afactorio(${__factorio_status}): port 34197%0Asyncplay(${__syncplay_status}): port 60000%0Acstrike(${__cstrike_status}): port 64000" "${inline_kbd}"
unset curmsg unset curmsg
declare -A curmsg declare -A curmsg
getmsg_content curmsg sentmsgs.txt getmsg_content curmsg sentmsgs.txt
@ -71,7 +71,7 @@ while [ "${1}" == "start" ]; do
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again..." editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again..."
ps -w -w -U steam -o args= | grep "hlds_linux" >/dev/null \ ps -w -w -U steam -o args= | grep "hlds_linux" >/dev/null \
&& __cstrike_status="online" || __cstrike_status="offline" && __cstrike_status="online" || __cstrike_status="offline"
sendmsg "${curmsg[chat_id]}" "${__ip}%0Aterraria(${__terraria_status}): port 7777%0Afactorio(${__factorio_status}: port 34197%0Asyncplay(${__syncplay_status}): port 60000%0Acstrike(${__cstrike_status}): port 64000" "${inline_kbd}" sendmsg "${curmsg[chat_id]}" "${__ip}%0Aterraria(${__terraria_status}): port 7777%0Afactorio(${__factorio_status}): port 34197%0Asyncplay(${__syncplay_status}): port 60000%0Acstrike(${__cstrike_status}): port 64000" "${inline_kbd}"
unset curmsg unset curmsg
declare -A curmsg declare -A curmsg
getmsg_content curmsg sentmsgs.txt getmsg_content curmsg sentmsgs.txt
@ -79,5 +79,5 @@ while [ "${1}" == "start" ]; do
} }
} }
done done
unset curmsg __ip __syncplay_status __cstrike_status unset curmsg __ip __terraria_status __factorio_status __syncplay_status __cstrike_status
done done