diff --git a/README.md b/README.md index bc4428a..f5e0789 100644 --- a/README.md +++ b/README.md @@ -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! -#### $$VERSION$$ v1.40-dev-34-g1440d56 +#### $$VERSION$$ v1.40-0-gf9dab50 diff --git a/addons/antiFlood.sh b/addons/antiFlood.sh index b4012a3..1fd6ef8 100644 --- a/addons/antiFlood.sh +++ b/addons/antiFlood.sh @@ -4,7 +4,7 @@ # this addon counts how many files, e.g. stickers, are sent to # a chat and takes actions if threshold is reached # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 # used events: # diff --git a/addons/example.sh b/addons/example.sh index 87a8caf..15cd539 100644 --- a/addons/example.sh +++ b/addons/example.sh @@ -4,7 +4,7 @@ # Addons can register to bashbot events at startup # 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. # diff --git a/bashbot.rc b/bashbot.rc index 9e51c8c..0ff801d 100755 --- a/bashbot.rc +++ b/bashbot.rc @@ -5,7 +5,7 @@ # # tested on: ubuntu, opensuse, debian # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 # shellcheck disable=SC2009 # shellcheck disable=SC2181 diff --git a/bashbot.sh b/bashbot.sh index 4523901..404fad6 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb # 8 - curl/wget missing # 10 - not bash! # -#### $$VERSION$$ v1.40-dev-34-g1440d56 +#### $$VERSION$$ v1.40-0-gf9dab50 ################################################################## # are we running in a terminal? @@ -460,7 +460,8 @@ sendJson(){ json='{'"${chat} $(iconv -f utf-8 -t utf-8 -c <<<"$2")"'}' if [ -n "${BASHBOTDEBUG}" ] ; then 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 # chat id not a number if [[ "${chat}" == *"NAN\"," ]]; then diff --git a/bin/any_command.sh b/bin/any_command.sh index fc75e87..fe8f3e7 100755 --- a/bin/any_command.sh +++ b/bin/any_command.sh @@ -21,7 +21,7 @@ USAGE='any_command.sh [-h|--help] [--force|--reference] bot_command args ...' # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 30.01.2021 10:24 # -#### $$VERSION$$ v1.40-dev-27-gc4d100e +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== #### diff --git a/bin/bashbot_env.inc.sh b/bin/bashbot_env.inc.sh index 5abb95b..d935e64 100644 --- a/bin/bashbot_env.inc.sh +++ b/bin/bashbot_env.inc.sh @@ -13,7 +13,7 @@ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 18.12.2020 12:27 # -#### $$VERSION$$ v1.40-dev-30-g3a29a9d +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== ############ diff --git a/bin/bashbot_init.inc.sh b/bin/bashbot_init.inc.sh index 3a16f39..382b0ec 100644 --- a/bin/bashbot_init.inc.sh +++ b/bin/bashbot_init.inc.sh @@ -11,7 +11,7 @@ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 27.01.2021 13:42 # -#### $$VERSION$$ v1.40-dev-32-gd876f75 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # shellcheck disable=SC2059 diff --git a/bin/bashbot_stats.sh b/bin/bashbot_stats.sh index 4a80b14..df23119 100755 --- a/bin/bashbot_stats.sh +++ b/bin/bashbot_stats.sh @@ -17,7 +17,7 @@ USAGE='bashbot_stats.sh [-h|--help] [debug]' # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 23.12.2020 20:34 # -#### $$VERSION$$ v1.32-dev-6-g2832801 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # set bashbot environment diff --git a/bin/delete_message.sh b/bin/delete_message.sh index 39ecbb1..8b26769 100755 --- a/bin/delete_message.sh +++ b/bin/delete_message.sh @@ -20,7 +20,7 @@ USAGE='delete_message.sh [-h|--help] "CHAT[ID]" "MESSAGE[ID]" [debug]' # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 03.01.2021 15:37 # -#### $$VERSION$$ v1.32-dev-6-g2832801 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== #### diff --git a/bin/edit_buttons.sh b/bin/edit_buttons.sh index a874d0c..0455d1c 100755 --- a/bin/edit_buttons.sh +++ b/bin/edit_buttons.sh @@ -26,7 +26,7 @@ USAGE='send_message.sh [-h|--help] "CHAT[ID]" "MESSAGE[ID]" "text|url" ...' # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 21.01.2021 08:10 # -#### $$VERSION$$ v1.35-dev-3-g461e748 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== #### diff --git a/bin/edit_message.sh b/bin/edit_message.sh index 04cb757..dd9b766 100755 --- a/bin/edit_message.sh +++ b/bin/edit_message.sh @@ -23,7 +23,7 @@ USAGE='send_edit_message.sh [-h|--help] [format|caption] "CHAT[ID]" "MESSAGE[ID] # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 23.12.2020 16:52 # -#### $$VERSION$$ v1.32-dev-6-g2832801 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== #### diff --git a/bin/kickban_user.sh b/bin/kickban_user.sh index c6acf8a..cb31df1 100755 --- a/bin/kickban_user.sh +++ b/bin/kickban_user.sh @@ -20,7 +20,7 @@ USAGE='kickban_user.sh [-h|--help] [-u|--unban] "CHAT[ID]" "USER[ID]" [debug]' # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 25.01.2021 20:34 # -#### $$VERSION$$ v1.35-dev-11-g6b102a7 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== #### diff --git a/bin/process_update.sh b/bin/process_update.sh index 27bb3a4..22b9898 100755 --- a/bin/process_update.sh +++ b/bin/process_update.sh @@ -15,7 +15,7 @@ USAGE='process_update.sh [-h|--help] [debug] [>"${fifo}.log" & sleep 0.5 # give bg job some time to init @@ -62,7 +62,7 @@ start_proc() { [ -z "$2" ] && return [ -x "${2%% *}" ] || return 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" mkfifo "${fifo}" nohup bash -c "{ $2 \"$4\" \"$5\" \"${fifo}\" | \"${SCRIPT}\" outproc \"$1\" \"${fifo}\" @@ -99,7 +99,7 @@ kill_proc() { fifo="$(procname "$1" "$2")" prid="$(proclist "${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 [ -n "${prid}" ] && kill ${prid} [ -s "${fifo}.log" ] || rm -f "${fifo}.log" diff --git a/modules/chatMember.sh b/modules/chatMember.sh index 7d4c316..ddaf992 100644 --- a/modules/chatMember.sh +++ b/modules/chatMember.sh @@ -5,7 +5,7 @@ # This file is public domain in the USA and all free countries. # 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 @@ -93,7 +93,7 @@ promote_chat_member() { *"invite"*) arg="can_invite_users";; *"restrict"*) arg="can_restrict_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;; esac # compose json diff --git a/modules/jsonDB.sh b/modules/jsonDB.sh index 5a78bb3..dfaec7d 100644 --- a/modules/jsonDB.sh +++ b/modules/jsonDB.sh @@ -5,7 +5,7 @@ # This file is public domain in the USA and all free countries. # 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 # diff --git a/modules/processUpdates.sh b/modules/processUpdates.sh index adb07e1..cb422e8 100644 --- a/modules/processUpdates.sh +++ b/modules/processUpdates.sh @@ -4,7 +4,7 @@ # File: processUpdates.sh # Note: DO NOT EDIT! this file will be overwritten on update # -#### $$VERSION$$ v1.40-dev-34-g1440d56 +#### $$VERSION$$ v1.40-0-gf9dab50 ################################################################## ############## diff --git a/modules/sendMessage.sh b/modules/sendMessage.sh index 70753d5..4185948 100644 --- a/modules/sendMessage.sh +++ b/modules/sendMessage.sh @@ -6,7 +6,7 @@ # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # # shellcheck disable=SC1117 -#### $$VERSION$$ v1.35-dev-18-ge4ee880 +#### $$VERSION$$ v1.40-0-gf9dab50 # will be automatically sourced from bashbot diff --git a/mycommands.conf b/mycommands.conf index e5e21ab..aace68d 100644 --- a/mycommands.conf +++ b/mycommands.conf @@ -12,7 +12,7 @@ # Author: KayM (gnadelwartz), kay@rrr.de # Created: 09.01.2021 07:27 # -#### $$VERSION$$ v1.35-dev-17-gb096338 +#### $$VERSION$$ v1.40-0-gf9dab50 ####################################################### ########## diff --git a/mycommands.sh b/mycommands.sh index ddb65b6..c8fcd2c 100644 --- a/mycommands.sh +++ b/mycommands.sh @@ -13,7 +13,7 @@ # License: WTFPLv2 http://www.wtfpl.net/txt/copying/ # Author: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.35-dev-24-g5a0a571 +#### $$VERSION$$ v1.40-0-gf9dab50 ####################################################### # shellcheck disable=SC1117 diff --git a/mycommands.sh.clean b/mycommands.sh.clean index eaed7d1..369d384 100644 --- a/mycommands.sh.clean +++ b/mycommands.sh.clean @@ -10,7 +10,7 @@ # License: WTFPLv2 http://www.wtfpl.net/txt/copying/ # Author: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.35-dev-26-gb45efa3 +#### $$VERSION$$ v1.40-0-gf9dab50 ####################################################### # shellcheck disable=SC1117 diff --git a/scripts/interactive.sh.clean b/scripts/interactive.sh.clean index bbb7434..15ec448 100755 --- a/scripts/interactive.sh.clean +++ b/scripts/interactive.sh.clean @@ -12,7 +12,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 ######################################################################## ###### diff --git a/test/ADD-test-new.sh b/test/ADD-test-new.sh index 59b933b..9df5b48 100755 --- a/test/ADD-test-new.sh +++ b/test/ADD-test-new.sh @@ -10,7 +10,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # 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, diff --git a/test/ALL-tests.inc.sh b/test/ALL-tests.inc.sh index 3f519fe..66ac9a6 100644 --- a/test/ALL-tests.inc.sh +++ b/test/ALL-tests.inc.sh @@ -11,7 +11,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # common variables diff --git a/test/a-commit-test.sh b/test/a-commit-test.sh index dfb9ac9..bc41832 100755 --- a/test/a-commit-test.sh +++ b/test/a-commit-test.sh @@ -10,7 +10,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== ../dev/hooks/pre-commit.sh diff --git a/test/b-example-test.sh b/test/b-example-test.sh index f60d0a6..d26411b 100644 --- a/test/b-example-test.sh +++ b/test/b-example-test.sh @@ -10,7 +10,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # include common functions and definitions diff --git a/test/c-init-test.sh b/test/c-init-test.sh index aca8c1b..8a0564d 100755 --- a/test/c-init-test.sh +++ b/test/c-init-test.sh @@ -10,7 +10,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # include common functions and definitions diff --git a/test/d-JSON.sh-test.sh b/test/d-JSON.sh-test.sh index bb996b7..08a1f42 100755 --- a/test/d-JSON.sh-test.sh +++ b/test/d-JSON.sh-test.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 # include common functions and definitions # shellcheck source=test/ALL-tests.inc.sh diff --git a/test/d-process_inline-test.sh b/test/d-process_inline-test.sh index 9e44a52..601832a 100755 --- a/test/d-process_inline-test.sh +++ b/test/d-process_inline-test.sh @@ -10,7 +10,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.35-dev-0-gd9b3342 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # include common functions and definitions diff --git a/test/d-process_message-test.sh b/test/d-process_message-test.sh index 502d4ad..dd38dd8 100755 --- a/test/d-process_message-test.sh +++ b/test/d-process_message-test.sh @@ -10,7 +10,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # include common functions and definitions diff --git a/test/d-send_message-test.sh b/test/d-send_message-test.sh index aadf8c9..e55b96b 100755 --- a/test/d-send_message-test.sh +++ b/test/d-send_message-test.sh @@ -10,7 +10,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # include common functions and definitions diff --git a/test/d-user_is-test.sh b/test/d-user_is-test.sh index 9d2802e..8daf09b 100755 --- a/test/d-user_is-test.sh +++ b/test/d-user_is-test.sh @@ -10,7 +10,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # include common functions and definitions diff --git a/test/e-env-test.sh b/test/e-env-test.sh index f9e80dc..85dd792 100755 --- a/test/e-env-test.sh +++ b/test/e-env-test.sh @@ -10,7 +10,7 @@ # LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # -#### $$VERSION$$ v1.30-0-g3266427 +#### $$VERSION$$ v1.40-0-gf9dab50 #=============================================================================== # include common functions and definitions