Bashbot Version 1.40

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-02-04 18:13:32 +01:00
parent f9dab50f84
commit 6fe19556b7
81 changed files with 87 additions and 85 deletions

View File

@ -241,4 +241,4 @@ See `mycommnds.sh.dist` for an example.
If you feel that there's something missing or if you found a bug, feel free to submit a pull request! If you feel that there's something missing or if you found a bug, feel free to submit a pull request!
#### $$VERSION$$ v1.40-dev-34-g1440d56 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -4,7 +4,7 @@
# this addon counts how many files, e.g. stickers, are sent to # this addon counts how many files, e.g. stickers, are sent to
# a chat and takes actions if threshold is reached # a chat and takes actions if threshold is reached
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
# used events: # used events:
# #

View File

@ -4,7 +4,7 @@
# Addons can register to bashbot events at startup # Addons can register to bashbot events at startup
# by providing their name and a callback per event # by providing their name and a callback per event
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
# #
# If an event occurs each registered event function is called. # If an event occurs each registered event function is called.
# #

View File

@ -5,7 +5,7 @@
# #
# tested on: ubuntu, opensuse, debian # tested on: ubuntu, opensuse, debian
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
# shellcheck disable=SC2009 # shellcheck disable=SC2009
# shellcheck disable=SC2181 # shellcheck disable=SC2181

View File

@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb
# 8 - curl/wget missing # 8 - curl/wget missing
# 10 - not bash! # 10 - not bash!
# #
#### $$VERSION$$ v1.40-dev-34-g1440d56 #### $$VERSION$$ v1.40-0-gf9dab50
################################################################## ##################################################################
# are we running in a terminal? # are we running in a terminal?
@ -460,7 +460,8 @@ sendJson(){
json='{'"${chat} $(iconv -f utf-8 -t utf-8 -c <<<"$2")"'}' json='{'"${chat} $(iconv -f utf-8 -t utf-8 -c <<<"$2")"'}'
if [ -n "${BASHBOTDEBUG}" ] ; then if [ -n "${BASHBOTDEBUG}" ] ; then
log_update "sendJson (${DETECTED_CURL}) CHAT=${chat#*:} JSON=${2:0:100} URL=${3##*/}" log_update "sendJson (${DETECTED_CURL}) CHAT=${chat#*:} JSON=${2:0:100} URL=${3##*/}"
log_message "DEBUG sendJson ==========\n$("${JSONSHFILE}" -b -n <<<"${json}" 2>&1)" # mask " and \ , remove newline from json
log_message "DEBUG sendJson ==========\n$("${JSONSHFILE}" -b -n <<<"$(sed -E -e 's/\\"/+/g' -e 's/\\/\\\\/g' -e 's/(\r|\n)//g' <<<"${json}")" 2>&1)"
fi fi
# chat id not a number # chat id not a number
if [[ "${chat}" == *"NAN\"," ]]; then if [[ "${chat}" == *"NAN\"," ]]; then

View File

@ -21,7 +21,7 @@ USAGE='any_command.sh [-h|--help] [--force|--reference] bot_command args ...'
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 30.01.2021 10:24 # CREATED: 30.01.2021 10:24
# #
#### $$VERSION$$ v1.40-dev-27-gc4d100e #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -13,7 +13,7 @@
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 18.12.2020 12:27 # CREATED: 18.12.2020 12:27
# #
#### $$VERSION$$ v1.40-dev-30-g3a29a9d #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
############ ############

View File

@ -11,7 +11,7 @@
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 27.01.2021 13:42 # CREATED: 27.01.2021 13:42
# #
#### $$VERSION$$ v1.40-dev-32-gd876f75 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# shellcheck disable=SC2059 # shellcheck disable=SC2059

View File

@ -17,7 +17,7 @@ USAGE='bashbot_stats.sh [-h|--help] [debug]'
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 23.12.2020 20:34 # CREATED: 23.12.2020 20:34
# #
#### $$VERSION$$ v1.32-dev-6-g2832801 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# set bashbot environment # set bashbot environment

View File

@ -20,7 +20,7 @@ USAGE='delete_message.sh [-h|--help] "CHAT[ID]" "MESSAGE[ID]" [debug]'
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 03.01.2021 15:37 # CREATED: 03.01.2021 15:37
# #
#### $$VERSION$$ v1.32-dev-6-g2832801 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -26,7 +26,7 @@ USAGE='send_message.sh [-h|--help] "CHAT[ID]" "MESSAGE[ID]" "text|url" ...'
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 21.01.2021 08:10 # CREATED: 21.01.2021 08:10
# #
#### $$VERSION$$ v1.35-dev-3-g461e748 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -23,7 +23,7 @@ USAGE='send_edit_message.sh [-h|--help] [format|caption] "CHAT[ID]" "MESSAGE[ID]
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 23.12.2020 16:52 # CREATED: 23.12.2020 16:52
# #
#### $$VERSION$$ v1.32-dev-6-g2832801 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -20,7 +20,7 @@ USAGE='kickban_user.sh [-h|--help] [-u|--unban] "CHAT[ID]" "USER[ID]" [debug]'
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 25.01.2021 20:34 # CREATED: 25.01.2021 20:34
# #
#### $$VERSION$$ v1.35-dev-11-g6b102a7 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -15,7 +15,7 @@ USAGE='process_update.sh [-h|--help] [debug] [<file]'
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 30.01.2021 19:14 # CREATED: 30.01.2021 19:14
# #
#### $$VERSION$$ v1.40-dev-32-gd876f75 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -25,7 +25,7 @@ USAGE='promote_user.sh [-h|--help] "CHAT[ID]" "USER[ID]" "right[:true|false]" ..
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 25.01.2021 22:34 # CREATED: 25.01.2021 22:34
# #
#### $$VERSION$$ v1.35-dev-11-g6b102a7 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -28,7 +28,7 @@ USAGE='broadcast_message.sh [-h|--help] [--doit] [--groups|--both|--db=file] [fo
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 16.12.2020 16:14 # CREATED: 16.12.2020 16:14
# #
#### $$VERSION$$ v1.32-dev-6-g2832801 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -26,7 +26,7 @@ USAGE='send_message.sh [-h|--help] "CHAT[ID]" "message" "text|url" ...'
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 18.01.2021 11:34 # CREATED: 18.01.2021 11:34
# #
#### $$VERSION$$ v1.35-dev-3-g461e748 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -25,7 +25,7 @@ USAGE='send_file.sh [-h|--help] "CHAT[ID]" "file|URL" "caption ...." [type] [deb
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 25.12.2020 20:24 # CREATED: 25.12.2020 20:24
# #
#### $$VERSION$$ v1.32-dev-6-g2832801 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -22,7 +22,7 @@ USAGE='send_message.sh [-h|--help] [format] "CHAT[ID]" "message ...." [debug]'
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# CREATED: 16.12.2020 11:34 # CREATED: 16.12.2020 11:34
# #
#### $$VERSION$$ v1.32-dev-6-g2832801 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
#### ####

View File

@ -15,7 +15,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.40-dev-34-g1440d56 #### $$VERSION$$ v1.40-0-gf9dab50
# #
# bashbot locale defaults to c.UTF-8, adjust locale in mycommands.sh if needed # bashbot locale defaults to c.UTF-8, adjust locale in mycommands.sh if needed

View File

@ -5,7 +5,7 @@
# #
# Description: run all tests, exit after failed test # Description: run all tests, exit after failed test
# #
#### $$VERSION$$ v1.35-dev-0-gd9b3342 #### $$VERSION$$ v1.40-0-gf9dab50
############################################################# #############################################################
#shellcheck disable=SC1090 #shellcheck disable=SC1090

View File

@ -5,7 +5,7 @@
# #
# Description: common stuff for all dev scripts # Description: common stuff for all dev scripts
# #
#### $$VERSION$$ v1.31-dev-2-g427f670 #### $$VERSION$$ v1.40-0-gf9dab50
############################################################# #############################################################
# magic to ensure that we're always inside the root of our application, # magic to ensure that we're always inside the root of our application,

View File

@ -3,7 +3,7 @@
# #
# works together with git pre-push.sh and ADD all changed files since last push # works together with git pre-push.sh and ADD all changed files since last push
#### $$VERSION$$ v1.31-dev-2-g427f670 #### $$VERSION$$ v1.40-0-gf9dab50
#shellcheck disable=SC1090 #shellcheck disable=SC1090
source "${0%/*}/dev.inc.sh" source "${0%/*}/dev.inc.sh"

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
############ ############
# NOTE: you MUST run install-hooks.sh again when updating this file! # NOTE: you MUST run install-hooks.sh again when updating this file!

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
############ ############
# NOTE: you MUST run install-hooks.sh again when updating this file! # NOTE: you MUST run install-hooks.sh again when updating this file!

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
############ ############
# NOTE: you MUST run install-hooks.sh again when updating this file! # NOTE: you MUST run install-hooks.sh again when updating this file!

View File

@ -7,7 +7,7 @@
# #
# Usage: source inject-json.sh # Usage: source inject-json.sh
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
############################################################## ##############################################################
# download JSON.sh # download JSON.sh

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# this has to run once atfer git clone # this has to run once atfer git clone
# and every time we create new hooks # and every time we create new hooks
#### $$VERSION$$ v1.31-dev-2-g427f670 #### $$VERSION$$ v1.40-0-gf9dab50
#shellcheck disable=SC1090 #shellcheck disable=SC1090
source "${0%/*}/dev.inc.sh" source "${0%/*}/dev.inc.sh"

View File

@ -7,7 +7,7 @@
# #
# Options: --notest - skip tests # Options: --notest - skip tests
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
############################################################## ##############################################################
#shellcheck disable=SC1090 #shellcheck disable=SC1090

View File

@ -7,7 +7,7 @@
# #
# Usage: source make-hmtl # Usage: source make-hmtl
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
############################################################## ##############################################################
# check for correct dir # check for correct dir

View File

@ -11,7 +11,7 @@
# If you your bot is finished you can use make-standalone.sh to create the # If you your bot is finished you can use make-standalone.sh to create the
# the old all-in-one bashbot: bashbot.sh and commands.sh only! # the old all-in-one bashbot: bashbot.sh and commands.sh only!
# #
#### $$VERSION$$ v1.31-dev-13-g127cc85 #### $$VERSION$$ v1.40-0-gf9dab50
################################################################### ###################################################################
#shellcheck disable=SC1090 #shellcheck disable=SC1090

View File

@ -2,7 +2,7 @@
# #
# joke hack to obfuscate bashbot.min.sh # joke hack to obfuscate bashbot.min.sh
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
# shellcheck disable=SC2028,SC2016,SC1117 # shellcheck disable=SC2028,SC2016,SC1117
infile="bashbot.sh" infile="bashbot.sh"

View File

@ -1,5 +1,5 @@
# list of additional files to check from shellcheck # list of additional files to check from shellcheck
#### $$VERSION$$ v1.31-dev-15-g07f026c #### $$VERSION$$ v1.40-0-gf9dab50
bashbot.rc bashbot.rc
mycommands.conf mycommands.conf
mycommands.sh.clean mycommands.sh.clean

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
#### $$VERSION$$ v1.32-dev-9-g13052f0 #### $$VERSION$$ v1.40-0-gf9dab50
# shellcheck disable=SC2016 # shellcheck disable=SC2016
# #
# Easy Versioning in git: # Easy Versioning in git:

View File

@ -132,5 +132,5 @@ You must update to [Version 1.20](https://github.com/topkecleon/telegram-bot-bas
#### [Next Create Bot](1_firstbot.md) #### [Next Create Bot](1_firstbot.md)
#### $$VERSION$$ v1.40-dev-34-g1440d56 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -65,5 +65,5 @@ group. This step is up to you actually.
#### [Prev Installation](0_install.md) #### [Prev Installation](0_install.md)
#### [Next Getting started](2_usage.md) #### [Next Getting started](2_usage.md)
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -372,5 +372,5 @@ send_action "${CHAT[ID]}" "action"
#### [Prev Create Bot](1_firstbot.md) #### [Prev Create Bot](1_firstbot.md)
#### [Next Advanced Usage](3_advanced.md) #### [Next Advanced Usage](3_advanced.md)
#### $$VERSION$$ v1.40-dev-34-g1440d56 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -302,5 +302,5 @@ Note: If you disable automatic retry, se above, you disable also connection prob
#### [Prev Getting started](2_usage.md) #### [Prev Getting started](2_usage.md)
#### [Next Expert Use](4_expert.md) #### [Next Expert Use](4_expert.md)
#### $$VERSION$$ v1.40-dev-34-g1440d56 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -434,5 +434,5 @@ for every poll until the maximum of BASHBOT_SLEEP ms.
#### [Prev Advanced Use](3_advanced.md) #### [Prev Advanced Use](3_advanced.md)
#### [Next Best Practice](5_practice.md) #### [Next Best Practice](5_practice.md)
#### $$VERSION$$ v1.40-dev-34-g1440d56 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -160,5 +160,5 @@ The second warning is about an unused variable, this is true because in our exam
#### [Prev Best Practice](5_practice.md) #### [Prev Best Practice](5_practice.md)
#### [Next Functions Reference](6_reference.md) #### [Next Functions Reference](6_reference.md)
#### $$VERSION$$ v1.40-dev-34-g1440d56 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -1578,5 +1578,5 @@ The name of your bot is available as bash variable "$ME", there is no need to ca
#### [Prev Best Practice](5_practice.md) #### [Prev Best Practice](5_practice.md)
#### [Next Notes for Developers](7_develop.md) #### [Next Notes for Developers](7_develop.md)
#### $$VERSION$$ v1.40-dev-29-g737be16 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -387,5 +387,5 @@ fi
#### [Prev Function Reference](6_reference.md) #### [Prev Function Reference](6_reference.md)
#### $$VERSION$$ v1.31-dev-0-gad532cc #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -60,6 +60,6 @@ plus use of keyboards in private chats. It's an extended version of mycommands.s
**Webhook** contains instructions on how use webhook API to get updates from telegram instead polling Telegram server. **Webhook** contains instructions on how use webhook API to get updates from telegram instead polling Telegram server.
#### $$VERSION$$ v1.40-dev-10-gc0f1af5 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -4,7 +4,7 @@
# #
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
###### ######
# parameters # parameters

View File

@ -2,7 +2,7 @@
# file: run_filename # file: run_filename
# background job to display content of all new files in WATCHDIR # background job to display content of all new files in WATCHDIR
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
###### ######
# parameters # parameters

View File

@ -2,7 +2,7 @@
# file: run_filename # file: run_filename
# background job to display all new files in WATCHDIR # background job to display all new files in WATCHDIR
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
###### ######
# parameters # parameters

View File

@ -4,7 +4,7 @@
# #
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
###### ######
# parameters # parameters

View File

@ -6,7 +6,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# shellcheck disable=SC1117 # shellcheck disable=SC1117
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
# adjust your language setting here # adjust your language setting here
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment # https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment

View File

@ -2,7 +2,7 @@
# file. multibot.sh # file. multibot.sh
# description: run multiple telegram bots from one installation # description: run multiple telegram bots from one installation
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
if [ "$2" = "" ] || [ "$2" = "-h" ]; then if [ "$2" = "" ] || [ "$2" = "-h" ]; then
echo "Usage: $0 botname command" echo "Usage: $0 botname command"

View File

@ -7,7 +7,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
SHELL=/bin/sh SHELL=/bin/sh

View File

@ -11,7 +11,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
######################################################################## ########################################################################
###### ######

View File

@ -10,7 +10,7 @@
# AUTHOR: KayM (), kay@rrr.de # AUTHOR: KayM (), kay@rrr.de
# DATE: 19.12.2020 19:03 # DATE: 19.12.2020 19:03
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# shellcheck disable=SC2154 # shellcheck disable=SC2154
# shellcheck disable=SC2034 # shellcheck disable=SC2034

View File

@ -13,7 +13,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
######################################################################## ########################################################################
###### ######

View File

@ -10,7 +10,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
######################################################################## ########################################################################
###### ######

View File

@ -1,7 +1,7 @@
# file: botacl # file: botacl
# a user not listed here, will return false from 'user_is_allowed' # a user not listed here, will return false from 'user_is_allowed'
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
# Format: # Format:
# user:resource:chat # user:resource:chat

View File

@ -5,7 +5,7 @@
# to show how you can customize bashbot by only editing mycommands.sh # to show how you can customize bashbot by only editing mycommands.sh
# NOTE: this is not tested, simply copied from original source and reworked! # NOTE: this is not tested, simply copied from original source and reworked!
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
# #
# shellcheck disable=SC2154 # shellcheck disable=SC2154
# shellcheck disable=SC2034 # shellcheck disable=SC2034

View File

@ -1,2 +1,3 @@
/usr/local/github/telegram-bot-bash-develop/DIST/telegram-bot-bash /usr/local/github/telegram-bot-bash-develop/DIST/telegram-bot-bash
/usr/local/github/telegram-bot-bash-develop/STANDALONE
/usr/local/telegram-bot-bash /usr/local/telegram-bot-bash

View File

@ -76,5 +76,5 @@ To stop delivering of Telegram updates via webhook run `bin/any_command.sh delet
**Important**: Only https connections with a valid certificate chain are allowed as endpoint for webhook. **Important**: Only https connections with a valid certificate chain are allowed as endpoint for webhook.
#### $$VERSION$$ v1.40-dev-29-g737be16 #### $$VERSION$$ v1.40-0-gf9dab50

View File

@ -11,7 +11,7 @@
* @license http://www.wtfpl.net/txt/copying/ WTFPLv2 * @license http://www.wtfpl.net/txt/copying/ WTFPLv2
* @since 30.01.2021 20:24 * @since 30.01.2021 20:24
* *
#### $$VERSION$$ v1.40-dev-21-g5b0b121 #### $$VERSION$$ v1.40-0-gf9dab50
***********************************************************/ ***********************************************************/
// bashbot home dir // bashbot home dir

View File

@ -5,7 +5,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.31-dev-13-g127cc85 #### $$VERSION$$ v1.40-0-gf9dab50
# #
# will be automatically sourced from bashbot # will be automatically sourced from bashbot

View File

@ -5,7 +5,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.31-dev-13-g127cc85 #### $$VERSION$$ v1.40-0-gf9dab50
# will be automatically sourced from bashbot # will be automatically sourced from bashbot

View File

@ -6,7 +6,7 @@
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
# shellcheck disable=SC1117,SC2059 # shellcheck disable=SC1117,SC2059
#### $$VERSION$$ v1.31-dev-13-g127cc85 #### $$VERSION$$ v1.40-0-gf9dab50
# will be automatically sourced from bashbot # will be automatically sourced from bashbot
@ -48,7 +48,7 @@ start_back() {
} }
restart_back() { restart_back() {
local fifo; fifo="${DATADIR:-.}/$(procname "$1" "back-$3-")" local fifo; fifo="${DATADIR:-.}/$(procname "$1" "back-$3-")"
log_message "Start background job CHAT=$1 JOB=${fifo##*/} CMD=${2##*/} $4 $5" log_update "Start background job CHAT=$1 JOB=${fifo##*/} CMD=${2##*/} $4 $5"
check_back "$1" "$3" && kill_proc "$1" "back-$3-" check_back "$1" "$3" && kill_proc "$1" "back-$3-"
nohup bash -c "{ $2 \"$4\" \"$5\" \"${fifo}\" | \"${SCRIPT}\" outproc \"$1\" \"${fifo}\"; }" &>>"${fifo}.log" & nohup bash -c "{ $2 \"$4\" \"$5\" \"${fifo}\" | \"${SCRIPT}\" outproc \"$1\" \"${fifo}\"; }" &>>"${fifo}.log" &
sleep 0.5 # give bg job some time to init sleep 0.5 # give bg job some time to init
@ -62,7 +62,7 @@ start_proc() {
[ -z "$2" ] && return [ -z "$2" ] && return
[ -x "${2%% *}" ] || return 1 [ -x "${2%% *}" ] || return 1
local fifo; fifo="${DATADIR:-.}/$(procname "$1")" local fifo; fifo="${DATADIR:-.}/$(procname "$1")"
log_message "Start interactive script CHAT=$1 JOB=${fifo##*/} CMD=$2 $3 $4" log_update "Start interactive script CHAT=$1 JOB=${fifo##*/} CMD=$2 $3 $4"
check_proc "$1" && kill_proc "$1" check_proc "$1" && kill_proc "$1"
mkfifo "${fifo}" mkfifo "${fifo}"
nohup bash -c "{ $2 \"$4\" \"$5\" \"${fifo}\" | \"${SCRIPT}\" outproc \"$1\" \"${fifo}\" nohup bash -c "{ $2 \"$4\" \"$5\" \"${fifo}\" | \"${SCRIPT}\" outproc \"$1\" \"${fifo}\"
@ -99,7 +99,7 @@ kill_proc() {
fifo="$(procname "$1" "$2")" fifo="$(procname "$1" "$2")"
prid="$(proclist "${fifo}")" prid="$(proclist "${fifo}")"
fifo="${DATADIR:-.}/${fifo}" fifo="${DATADIR:-.}/${fifo}"
log_message "Stop interactive / background CHAT=$1 JOB=${fifo##*/}" log_update "Stop interactive / background CHAT=$1 JOB=${fifo##*/}"
# shellcheck disable=SC2086 # shellcheck disable=SC2086
[ -n "${prid}" ] && kill ${prid} [ -n "${prid}" ] && kill ${prid}
[ -s "${fifo}.log" ] || rm -f "${fifo}.log" [ -s "${fifo}.log" ] || rm -f "${fifo}.log"

View File

@ -5,7 +5,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.40-dev-1-g41e2d09 #### $$VERSION$$ v1.40-0-gf9dab50
# will be automatically sourced from bashbot # will be automatically sourced from bashbot
@ -93,7 +93,7 @@ promote_chat_member() {
*"invite"*) arg="can_invite_users";; *"invite"*) arg="can_invite_users";;
*"restrict"*) arg="can_restrict_members";; *"restrict"*) arg="can_restrict_members";;
*"promote"*) arg="can_promote_members";; *"promote"*) arg="can_promote_members";;
*) [ -n "${BASHBOT_DEBUG}" ] && debug_log "${FUNCNAME[0]}: unknown promotion ${arg}" *) [ -n "${BASHBOTDEBUG}" ] && debug_log "${FUNCNAME[0]}: unknown promotion ${arg}"
continue;; continue;;
esac esac
# compose json # compose json

View File

@ -5,7 +5,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.40-dev-3-g7c74824 #### $$VERSION$$ v1.40-0-gf9dab50
# #
# source from commands.sh to use jsonDB functions # source from commands.sh to use jsonDB functions
# #

View File

@ -4,7 +4,7 @@
# File: processUpdates.sh # File: processUpdates.sh
# Note: DO NOT EDIT! this file will be overwritten on update # Note: DO NOT EDIT! this file will be overwritten on update
# #
#### $$VERSION$$ v1.40-dev-34-g1440d56 #### $$VERSION$$ v1.40-0-gf9dab50
################################################################## ##################################################################
############## ##############

View File

@ -6,7 +6,7 @@
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
# shellcheck disable=SC1117 # shellcheck disable=SC1117
#### $$VERSION$$ v1.35-dev-18-ge4ee880 #### $$VERSION$$ v1.40-0-gf9dab50
# will be automatically sourced from bashbot # will be automatically sourced from bashbot

View File

@ -12,7 +12,7 @@
# Author: KayM (gnadelwartz), kay@rrr.de # Author: KayM (gnadelwartz), kay@rrr.de
# Created: 09.01.2021 07:27 # Created: 09.01.2021 07:27
# #
#### $$VERSION$$ v1.35-dev-17-gb096338 #### $$VERSION$$ v1.40-0-gf9dab50
####################################################### #######################################################
########## ##########

View File

@ -13,7 +13,7 @@
# License: WTFPLv2 http://www.wtfpl.net/txt/copying/ # License: WTFPLv2 http://www.wtfpl.net/txt/copying/
# Author: KayM (gnadelwartz), kay@rrr.de # Author: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.35-dev-24-g5a0a571 #### $$VERSION$$ v1.40-0-gf9dab50
####################################################### #######################################################
# shellcheck disable=SC1117 # shellcheck disable=SC1117

View File

@ -10,7 +10,7 @@
# License: WTFPLv2 http://www.wtfpl.net/txt/copying/ # License: WTFPLv2 http://www.wtfpl.net/txt/copying/
# Author: KayM (gnadelwartz), kay@rrr.de # Author: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.35-dev-26-gb45efa3 #### $$VERSION$$ v1.40-0-gf9dab50
####################################################### #######################################################
# shellcheck disable=SC1117 # shellcheck disable=SC1117

View File

@ -12,7 +12,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
######################################################################## ########################################################################
###### ######

View File

@ -10,7 +10,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# magic to ensure that we're always inside the root of our application, # magic to ensure that we're always inside the root of our application,

View File

@ -11,7 +11,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# common variables # common variables

View File

@ -10,7 +10,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
../dev/hooks/pre-commit.sh ../dev/hooks/pre-commit.sh

View File

@ -10,7 +10,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# include common functions and definitions # include common functions and definitions

View File

@ -10,7 +10,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# include common functions and definitions # include common functions and definitions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
# include common functions and definitions # include common functions and definitions
# shellcheck source=test/ALL-tests.inc.sh # shellcheck source=test/ALL-tests.inc.sh

View File

@ -10,7 +10,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.35-dev-0-gd9b3342 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# include common functions and definitions # include common functions and definitions

View File

@ -10,7 +10,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# include common functions and definitions # include common functions and definitions

View File

@ -10,7 +10,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# include common functions and definitions # include common functions and definitions

View File

@ -10,7 +10,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# include common functions and definitions # include common functions and definitions

View File

@ -10,7 +10,7 @@
# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/
# AUTHOR: KayM (gnadelwartz), kay@rrr.de # AUTHOR: KayM (gnadelwartz), kay@rrr.de
# #
#### $$VERSION$$ v1.30-0-g3266427 #### $$VERSION$$ v1.40-0-gf9dab50
#=============================================================================== #===============================================================================
# include common functions and definitions # include common functions and definitions