diff --git a/bashbot.sh b/bashbot.sh index 14de2d1..4a38194 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.45-dev-2-ga6ff405 +#### $$VERSION$$ v1.45-dev-3-g429c230 ################################################################## # are we running in a terminal? diff --git a/bin/bashbot_init.inc.sh b/bin/bashbot_init.inc.sh index 48d7f13..d5ece74 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.45-dev-2-ga6ff405 +#### $$VERSION$$ v1.45-dev-3-g429c230 #=============================================================================== # shellcheck disable=SC2059 @@ -104,13 +104,13 @@ bot_init() { fi # adjust permissions printf "Adjusting files and permissions for user \"${touser}\" ...\n" + chown -Rf "${chown}" . ./* chmod 711 . chmod -R o-w ./* chmod -R u+w "${COUNTFILE}"* "${BLOCKEDFILE}"* "${DATADIR}" logs "${LOGDIR}/"*.log 2>/dev/null chmod -R o-r,o-w "${COUNTFILE}"* "${BLOCKEDFILE}"* "${DATADIR}" "${BOTACL}" 2>/dev/null # jsshDB must writeable by owner find . -name '*.jssh*' -exec chmod u+w \{\} + - chown -Rf "${chown}" . ./* printf "Done.\n" # adjust values in bashbot.rc if [ -w "bashbot.rc" ]; then diff --git a/modules/sendMessage.sh b/modules/sendMessage.sh index f441b99..710f480 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.45-dev-0-g9d36f23 +#### $$VERSION$$ v1.45-dev-3-g429c230 # will be automatically sourced from bashbot @@ -340,8 +340,11 @@ forward_message() { [ -z "$3" ] && return sendJson "$1" '"from_chat_id": '"$2"', "message_id": '"$3"'' "${URL}/forwardMessage" } -forward() { # backward compatibility - forward_message "$@" || return + +# $1 CHAT $2 from chat $3 from msg id +copy_message() { + [ -z "$3" ] && return + sendJson "$1" '"from_chat_id": '"$2"', "message_id": '"$3"'' "${URL}/copyMessage" } # $1 CHAT $2 bashbot formatted message, see manual advanced usage