bashbot polling mode

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-03-03 18:37:57 +01:00
parent eb0c227615
commit 0a296eaaa1
2 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb
# 8 - curl/wget missing
# 10 - not bash!
#
#### $$VERSION$$ v1.45-dev-69-gb454827
#### $$VERSION$$ v1.45-dev-73-geb0c227
##################################################################
# are we running in a terminal?
@ -831,7 +831,7 @@ if [ -z "${SOURCE}" ]; then
;;
# finally starts the read update loop, internal use only
"startbot" )
_exec_if_function start_bot "$2"
_exec_if_function start_bot "$2" "polling mode"
_exec_if_function get_updates "$2"
debug_checks "end startbot" "$@"
exit
@ -902,7 +902,7 @@ if [ -z "${SOURCE}" ]; then
# shellcheck disable=SC2086
if kill ${BOTPID}; then
# inform botadmin about stop
send_normal_message "${BOTADMIN}" "Bot ${ME} stopped ..." &
send_normal_message "${BOTADMIN}" "Bot ${ME} polling mode stopped ..." &
printf "${GREEN}OK. Bot stopped successfully.${NN}"
else
printf "${RED}An error occurred while stopping bot.${NN}"

View File

@ -4,7 +4,7 @@
# File: processUpdates.sh
# Note: DO NOT EDIT! this file will be overwritten on update
#
#### $$VERSION$$ v1.45-dev-55-g5dd24c3
#### $$VERSION$$ v1.45-dev-73-geb0c227
##################################################################
##############
@ -327,7 +327,7 @@ start_bot() {
# read blocked users
jssh_readDB_async "BASHBOTBLOCKED" "${BLOCKEDFILE}"
# inform botadmin about start
send_normal_message "$(getConfigKey "botadmin")" "Bot $(getConfigKey "botname") started ..." &
send_normal_message "$(getConfigKey "botadmin")" "Bot ${ME} $2 started ..." &
##########
# bot is ready, start processing updates ...
}