reordered services and added new ones
This commit is contained in:
parent
551cc4078e
commit
26303edf63
17
bot.sh
17
bot.sh
|
@ -45,12 +45,16 @@ while [ "${1}" == "start" ]; do
|
|||
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again."
|
||||
__ip="$(./getip.sh "${bot_tmpdir}")"
|
||||
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again.."
|
||||
ps -w -w -U steam -o args= | grep "TShock.Server" >/dev/null \
|
||||
&& __terraria_status="online" || __terraria_status="offline"
|
||||
ps -w -w -U steam -o args= | grep "factorio" >/dev/null \
|
||||
&& __factorio_status="online" || __factorio_status="offline"
|
||||
ps -w -w -U syncplay -o args= | grep "syncplay-server" >/dev/null \
|
||||
&& __syncplay_status="online" || __syncplay_status="offline"
|
||||
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again..."
|
||||
ps -w -w -U steam -o args= | grep "hlds_linux" >/dev/null \
|
||||
&& __cstrike_status="online" || __cstrike_status="offline"
|
||||
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "${__ip}%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
|
||||
declare -A curmsg
|
||||
getmsg_content curmsg sentmsgs.txt
|
||||
|
@ -58,11 +62,16 @@ while [ "${1}" == "start" ]; do
|
|||
}
|
||||
[ "${curmsg[text]}" == "/start" ] && {
|
||||
__ip="$(./getip.sh "${bot_tmpdir}")"
|
||||
ps -w -w -U syncplay -o args= | grep "syncplay-server" >/dev/null\
|
||||
ps -w -w -U steam -o args= | grep "TShock.Server" >/dev/null \
|
||||
&& __terraria_status="online" || __terraria_status="offline"
|
||||
ps -w -w -U steam -o args= | grep "factorio" >/dev/null \
|
||||
&& __factorio_status="online" || __factorio_status="offline"
|
||||
ps -w -w -U syncplay -o args= | grep "syncplay-server" >/dev/null \
|
||||
&& __syncplay_status="online" || __syncplay_status="offline"
|
||||
ps -w -w -U steam -o args= | grep "hlds_run" >/dev/null\
|
||||
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again..."
|
||||
ps -w -w -U steam -o args= | grep "hlds_linux" >/dev/null \
|
||||
&& __cstrike_status="online" || __cstrike_status="offline"
|
||||
sendmsg "${curmsg[chat_id]}" "${__ip}%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
|
||||
declare -A curmsg
|
||||
getmsg_content curmsg sentmsgs.txt
|
||||
|
|
Loading…
Reference in New Issue